这就是我所拥有的
$(".thoughts_box").blur(function(){
var box_id= $(this).attr("id").split("_")[$(this).attr("id").split("_").length-1];
//console.log($(this).attr("id") + " " + $(this).val());
writeListValue(1,box_id,$(this).val());
});
<table width="100%" style="line-height:0px" >
<tr>
<td><p>1.</p></td>
<td><input class="printArea_1 thoughts_box" name="activities_thoughts_1" id="activities_thoughts_1" type="text" style="width:345px;" placeholder="Type or click list button >" /></td>
<td><input type="button" id="thoughts_1" class="list_btn ext_thoughts" value="List >" name="_1" /></td>
</tr>
答案 0 :(得分:0)
委派活动。
而不是
$(".thoughts_box").blur(function()
试
$(document).on("blur", ".thoughts_box", function()
或更好
$('table').on("blur", ".thoughts_box", function()