将图像按钮绑定到window.open [英] bind image button to window.open
本文介绍了将图像按钮绑定到window.open的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好先生.
我想将imagebutton ID绑定到javascript中的window.open方法.
如何绑定.我的代码如下.
如果有人知道,请帮助我.
hello sir.
i want to bind imagebutton ID to window.open method in javascript.
how to bind that. my code is below.
if anybody know please helpme.
<script type="text/javascript">
function openwindow(ID) {
window.open("AllPage.aspx", "mywindow", "menubar=1,resizable=1,width=350,height=250");
}
</script>
<td style="width:80px;">
<asp:ImageButton ID="ImgBtnCategory" runat="server" OnClientClick='<%# Eval("CarID", "window.open(\"EditID.aspx?ID={0}\", null, \"width=500,height=350,top=100,left=10\", \"true\");") %>' />
</td>
推荐答案
这样的事情如何?
How about something like this?
<script type="text/javascript">
function openwindow(ID) {
window.open("EditID.aspx?ID=" + ID, "mywindow", "menubar=1,resizable=1,width=350,height=250");
}
</script>
<td style="width:80px;">
<asp:imagebutton id="ImgBtnCategory" runat="server" onclientclick="javascript:openwindow(<%=CarID%>);" xmlns:asp="#unknown" />
</td>
祝你好运!
Good luck!
这篇关于将图像按钮绑定到window.open的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文