jsp在div中嵌入新的button按钮,不能触发
客户姓名:<input type="text" id="creditName" name="creditName"/><br /><br />
签定日期:<s:textfield name="createDate" id="createDate"></s:textfield>
<br /><br />
<input type="button" id="search-button" value="查询"/>
<input type="button" id="addNum" name="addNum"/>
<s:div id="selectInfor" style="display:none;">
<tr>
<th><b>客户编号</b></th>
<th><b>客户姓名</b></th>
<th><b>申请资金</b></th>
<th><b>操作</b></th>
</tr>
</s:div>
<input type="text" id="clientid" name="clientid"/>
<input type="text" id="proposername" name="proposername"/>
<div id="infor">
<table class="table_box table_bottom_border" id="resultListTable">
<tr>
<th><b>客户编号</b></th>
<th><b>客户姓名</b></th>
<th><b>申请资金</b></th>
<th><b>操作</b></th>
</tr>
<s:iterator value="creditList" status="index" var="var">
<tr>
<td>${clientid}</td>
<td>${proposername }</td>
<td>${applymoney }</td>
<td><input type="button" class="getInfor" value="确定"/></td>
</tr>
</s:iterator>
</table>
</div>
<script type="text/javascript">
<!--
$("#search-button").click(function(){
var putin = $("#creditName").serializeArray();
$.ajax({
url : "creditApplyTestAction.action",type : "post",dataType:"json",data : putin,timeout : 20000,// 设置请求超时时间(毫秒)。
contentType: "application/x-www-form-urlencoded; charset=utf-8",
beforeSend: function(XMLHttpRequest){
},
success : function(data) {
$("#infor").remove();
var html="";
html += "<table class='table_box table_bottom_border' id='newInforList'& gt;<tr><th><b>客户编号</b>< /th><th><b>客户姓名</b></th><th><b>申请 资金</b></th><th><b>操作</b></th>< /tr>";
html += ("<tr><td>" + data["clientid"] + "</td><td>" + data["proposername"] + "</td><td>" + data["applymoney"] + "</td><td>" + "<input type='button' class=\"getInfor\" id='newButton' value='确定'/>" + "</td></tr></table>");
$("#selectInfor").html(html); //将拼装后的代码嵌入到<div>标签内。
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
});
$(".getInfor").click(function(){
$("#clientid").val($(this).parent("td").parent("tr").children("td:eq(0)").text());
$("#proposername").val($(this).parent("td").parent("tr").children("td:eq(1)").text());
$("#OpenDialog").dialog("close");
});
//-->
</script>