JavaScript 弹出窗口问题 急 在线等
javaScript 代码: <script language= "javascript ">
function comOpen(fileOpen,w,h)
{
window.open (fileOpen, " ", "top=100,left=100,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width= "+w+ ",height= "+h+ " ");
}
</script>
调用代码:
<asp:HyperLinkColumn Target= "_blank " DataNavigateUrlField= "Book_ID " DataNavigateUrlFormatString= "JavaScript:comOpen( './BookDetail.aspx? BookID={0} ') " DataTextField= "Book_Name " SortExpression= "Book_Name " HeaderText= "书名 "> </asp:HyperLinkColumn>
出现错误:
行:1
字符:1
错误:缺少对象
代码:0
url:javascript:comOpen( './BookEdit,aspx?BookID=25 ',550,480)
望高手指教
------解决方案-------------------- <script language= "javascript ">
function comOpen(fileOpen,w,h)
{
window.open (fileOpen, " ", "top=100,left=100,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width= '+w+ ',height= '+h+ ' ");
}
</script>
width= '+w+ ',height= '+h+ '
单引号