jQuery 给属性添加html值 $("#loginName").html(label_loginName); <th id="loginName"></th> 赋值操作要写在$(function() {})里面,写在外面不会执行