Response.Write("<script language=javascript>yhbh=document.getElementById('<%=txtBh.ClientID %>').value; if(yhbh=='') {alert('请输入用户编号'); return;} ;window.open('sftm.aspx?yhbh='+yhbh,'收费条目','toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=500'); )</script>"); ,这样写对不,应怎样改,在线等,立即给分
function P()
{
yhbh=document.getElementById('<%=txtBh.ClientID %>').value;
if(yhbh=='')
{
alert('请输入用户编号');
return;
}
window.open('sftm.aspx?yhbh='+yhbh,'收费条目','toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=500');
}
</script>
Response.Write(@"<script language=javascript>P();</script>");
缺少对象的错,你检查下 <%=txtBh.ClientID %> 这个在服务器控件的ID对不对