点击按钮打开弹出窗口 [英] open pop up window on button click
本文介绍了点击按钮打开弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
如何点击按钮点击asp.net中的弹出窗口....
谢谢&问候
Srishti
解决方案
在客户端,你可以通过调用像function alertpopup(){
alert(' 弹出');
}
在客户端点击按钮调用此方法。
打开一个PopUp
要打开一个弹出窗口,JavaScript命令是window.open()
下面是一个打开一个新弹出窗口的函数接受要打开的页面的URL的窗口。
var PopUpObj;
function popUp(url)
{
PopUpObj = window .open(url);
PopUpObj.focus();
}
例如:
popUp(Default.aspx)
< pre lang =xml> < script 类型 = text / javascript >
function basicPopup(){
popupWindow = window.open(xsl2.aspx,'popUpWindow','height = 300 ,width = 600,left = 100,top = 30,resizable = No,scrollbars = No,toolbar = no,menubar = no,location = no,directories = no,status = No');
}
< / script > 跨度>
Hello
How to open pop up window in asp.net on button click....
thanks & Regards
Srishti
解决方案
In client side you can do that by calling a js method likefunction alertpopup(){ alert('pop up'); }
call this method on client click of the button.
Open a PopUp
To open a pop up window the JavaScript command is window.open()
Below is a function that opens a new popup window which accepts the url of the page to be opened.
var PopUpObj; function popUp(url) { PopUpObj = window.open(url); PopUpObj.focus(); }
example:
popUp("Default.aspx")
<script type="text/javascript"> function basicPopup() { popupWindow = window.open("xsl2.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No'); } </script>
这篇关于点击按钮打开弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文