日期:2014-05-20  浏览次数:20804 次

不知道为什么我的js报错说语法不对。。
不知道为什么报错说语法错误:
Uncaught SyntaxError: Unexpected token { finance002.js:6
(anonymous function)
d.extend._Deferred.f.resolveWith
v
d.support.ajax.d.ajaxTransport.send.c

代码在此:
[code=JScript][/code]
function detail(){
var idtmp = gup("id");
alert(idtmp);
$.get("../../getinvoicebyiid.do?id='+idtmp+'", "", function(
data, textStatus){
var Result = eval("(" + data + ")");
var Invoice = Result.info;
  var iid = Invoice.iid;
  var ino = Invoice.ino;
  var idate = Invoice.idate;
  var aftertax = Invoice.aftertax;
var projno = Invoice.projno;
var buyername = Invoice.buyername;
var createdate = Invoice.createdate;
var accountant = Invoice.accountant;
var filename = Invoice.filename;
var filepath = Invoice.filepath;
var TR="";

TR+=("<tr>"+"<td>"+ino+"</td>"+"<td>"+projno+"</td>"+"<td>"+idate+"</td>"+
"<td>"+buyername+"</td>"+"<td>"+createdate+"</td>"+"<td>"+aftertax+"</td>"+
"<td>"+accountant+"</td>"+"<td>"+filename+"</td>"+"<td>"+filepath+"</td>"+
"<td><a href=''>编辑</a></td><td><a href=''>删除</a></td></tr>");
$("#tbody").append(TR);
});
}

------解决方案--------------------
firebug加断点调试看看
------解决方案--------------------
探讨
不知道为什么报错说语法错误:
Uncaught SyntaxError: Unexpected token { finance002.js:6
(anonymous function)
d.extend._Deferred.f.resolveWith
v
d.support.ajax.d.ajaxTransport.send.c
……

------解决方案--------------------
探讨

引用:
不知道为什么报错说语法错误:
Uncaught SyntaxError: Unexpected token { finance002.js:6
(anonymous function)
d.extend._Deferred.f.resolveWith
v
d.support.ajax.……

------解决方案--------------------
打断点,一行一行地观察、分析