var q = "SELECT Name, Address FROM Login where Login = 'app'";
var tablerow = "<tr> <td title="+q+"></td> </tr>"
当我将光标移到表格列上时。它显示:
SELECT Name,Address FROM Login Login =
未显示完整字符串
答案 0 :(得分:2)
对我来说这很好用:
所以我只是使用这些行:
window.onload = function() {
hoverinfo.title = "SELECT Name, Address FROM Login where Login = 'app'";
}
&#13;
<table>
<tr>
<td id="hoverinfo">hover</td>
</tr>
</table>
&#13;
使用动态代码(fiddle):
var q = "SELECT Name, Address FROM Login where Login = 'app'";
var tablerow = "<tr> <td title=\""+q+"\"> title </td> </tr>"
window.onload = function() {
table.innerHTML += tablerow
}
&#13;
<table id="table">
</table>
&#13;