日期:2014-05-16  浏览次数:20328 次

js 对象的打印
<script type="text/javascript">

var siteClass = function (id,title,content)
{
this.id = id;
this.title = title;
this.content =content;
}

$(function(){

var trSite = new siteClass("1","d","d");
var tr = "<a href='javaScript:Look("+trSite+")'>dd</a>"; 
$("#list").html(tr);

});

function Look(obj)
{
 alert(obj);
}
</script>
</head>
<body>
  <form id="form1" runat="server">
  <div id="list">
   
  </div>
  </form>
</body>

语法错误 拼接的 标签 如何 打印object 对象 语法怎么写 ?

------解决方案--------------------
探讨
引用:

JScript code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META……