//<![CDATA[
$(window).load(function() {
$('.n_val').focusout(function() {
alert(this.id);
});
});//]]>
动态生成文本框
buffer += "<tr><td>" + nomen_list.getName() + "</td><td><input type='text' style='width:50px' class='n_val' id=" + nomen_list.getId() + "-" + nomen_list.getCat() + " value=" + nomen_list.getVal() + " /></td></tr>";
我得到动态文本框,但focusout
不适用于动态生成的文本框,而同一页面有一些文本框,这是硬编码的,上面的脚本被触发。