<a href='javascript:window.showModalDialog("PolicyCategoryAlter.aspx?id=<%#Eval("ID") %>&pid=<%=_parentCategoryID %>","dialogWidth=500px;dialogHeight=200px;status=no;help=no;scrollbars=no");window.location.href=window.location.href;'>编辑</a>
谁能帮我解决这个js引号嵌套问题
试试
<a href="javascript:window.showModalDialog('PolicyCategoryAlter.aspx?id=<%#Eval("ID") %>&pid=<%=_parentCategoryID %>','dialogWidth=500px;dialogHeight=200px;status=no;help=no;scrollbars=no');window.location.href=window.location.href;">编辑</a>
朋友还是不行啊
@dotnet平台开发者: 我试了是没问题的哦
<a href="javascript:window.showModalDialog('test.aspx?id=<%# Eval("ID") %>&pid=<%=IndexAdd %>','dialogWidth=500px;dialogHeight=200px;status=no;help=no;scrollbars=no');window.location.href=window.location.href;">编辑</a>
单引号放在双引号里面……试试吧!!!
最外层双引号,里面放单引号
try this:
<a href='javascript:window.showModalDialog('<%# "PolicyCategoryAlter.aspx?id=" + Eval("ID") +"&pid=" + Eval("_parentCategoryID") %>'","dialogWidth=500px;dialogHeight=200px;status=no;help=no;scrollbars=no");window.location.href=window.location.href;'>编辑</a>
问题应该出现在那两个变量上
<a href='javascript:window.showModalDialog("PolicyCategoryAlter.aspx?id='<%#Eval("ID") %>'&pid='<%=_"parentCategoryID" %>',dialogWidth=500px;dialogHeight=200px;status=no;help=no;scrollbars=no");window.location.href=window.location.href;'>编辑</a>