不好意思,我没分了。请看一下
当str是多行的时候(用户在Textbox输再从数据库调的),就报错(未结束的字符串常量),有办法吗?
谢谢了
function OpenRes(str)
{
OpenWindow = window.open ("", "Info", "height=250, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, resizable=no, status=no, top=50, left=50")
OpenWindow.document.write("<HTML><TITLE>信息</TITLE><Table width=400 height=250><TR><td valign=top>")
OpenWindow.document.write("<BODY leftmargin='3px' topmargin='3px'>")
OpenWindow.document.write("<Table><TR><TD valign='top' width='394px' height='244px'><h3>"+str+"</h3></TD></TR></Table>")
OpenWindow.document.write("</td></tr></Table></BODY></HTML>")
OpenWindow.document.close()
}