请问我怎么在qtip的content的元素后接代码。急!谢谢
例如:
读取json数据生成html
html += "<tr>";
html += "<td>"+entry[NAME]+"</td>";
html += "</tr>";
怎么把这部分代码放到content里
$("#id").qtip({
  content:'如何存放上面的html'
});

解决方案 »

  1.   


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <TITLE> New Document </TITLE>
      <META NAME="Generator" CONTENT="EditPlus">
      <META NAME="Author" CONTENT="">
      <META NAME="Keywords" CONTENT="">
      <META NAME="Description" CONTENT="">
      <script type="text/javascript" src="jquery-1.3.2.min.js"></script>   
      <script type="text/javascript" src="jquery.qtip-1.0.0-rc3.min.js"></script> 
    <script type="text/javascript">
        $(document).ready(function() {
    var entry={NAME:"TTTT"};
    var html="";
    html += "<table><tr>";
    html += "<td>"+entry["NAME"]+"</td>";
    html += "</table></tr>";        $("#prototype").qtip({
                content: html,
                position: { corner: { target: 'bottomRight', tooltip: 'center'} },
                style: { name: 'cream', tip: 'leftTop' },
                show: 'mouseover',
                hide: 'mouseout'
            });
        });

    </script>
    </head>
    <body>
    <table border=1>
    <tr><td width=120 id="prototype">prototype.js</td></tr>
    <tr><td width=120 id="jquery">jQuery</td></tr>
    <tr><td width=120 id="extjs">ExtJS</td></tr>
    </table>
    </body></HTML>参考:http://kanglecjr.javaeye.com/blog/870868楼主要利用好Googlebaidu