html语句中,window.open的条件语句怎么写 本帖最后由 b0172716 于 2012-03-31 15:42:42 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <a href="javascript:void(null)" onclick="javascript:if(<%#Eval("number")%>>10){window.open('main.aspx?num=<%#Eval("number")%>',[/color]null,'toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no, status=no,top=0,left=0,right=0,width=750,height=620');}"> 这么晦涩的代码,你放到一个function中多好 建议你写个JS方法把(<%#Eval("number")%>) 传过去之后就没什么问题了 然后去function里面写判断和window.open这样 使用 Javascript 写个函数 把参数传进去 判断 多好 啊 <a href="javascript:void(null)" onclick='xx(<%#Eval("number")%>)'>function xx(num){if(num==10)window.open('main.aspx',null,'toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no, status=no,top=0,left=0,right=0,width=750,height=620');} else(……) 1楼的,还有一个条件没有啊,5楼的,我还要传值的'ybj1.aspx?num=<%#Eval("number")%>&fk=<%#Eval("kankui")%>&sh=<%#Eval("shenhe") 放哪里传呢,我试了都不行 <a href="javascript:void(null)" onclick='xx(<%#Eval("number")%>)'>function xx(num){if(num==10)window.open('main.aspx?num=<%#Eval("number")%>&fk=<%#Eval("kankui")%>&sh=<%#Eval("shenhe")',null,'toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no, status=no,top=0,left=0,right=0,width=750,height=620');} else(……)那些值传不过去 来学习的 window.open实现的是什么功能?》 .net 真奇怪,关于out 类型参数 [请教][难度问题]按钮事件中有循环的问题,用另一个按钮控制停止,暂停,继续 求救:怎样在不规则的图形中绘画文本 将一个函数imsert_my,结果在System.map文件中看不到, treeview 使用的问题 C#中的控件是由类组合成的吗?控件是处于隐藏状态吗 如何在datagrid里运行时在众记录中插入一空白行。 请问各位,哪有VS.NET下载? 本地图片死活加载不出来 生成订单功能应该加在哪个类中 如何设计 使用页面缓存,缓存实例化对象是否有必要?
<a href="javascript:void(null)" onclick="javascript:if(<%#Eval("number")%>>10){window.open('main.aspx?num=<%#Eval("number")%>',[/color]null,'toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no, status=no,top=0,left=0,right=0,width=750,height=620');}">
function xx(num){
if(num==10)
window.open('main.aspx',null,'toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no, status=no,top=0,left=0,right=0,width=750,height=620');
}
else(
……
)
function xx(num){
if(num==10)
window.open('main.aspx?num=<%#Eval("number")%>&fk=<%#Eval("kankui")%>&sh=<%#Eval("shenhe")',null,'toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no, status=no,top=0,left=0,right=0,width=750,height=620');
}
else(
……
)那些值传不过去