关于使用按钮 [英] About useing button
本文介绍了关于使用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用关闭按钮关闭母版页下的网页
I want to use a closebutton to close a webpage under from master page
how can I use this.
推荐答案
您可以使用给定的代码关闭网页
you can use given code to close an Webpage
<input type="button" onclick="self.close();" value="Close" />
:)
尝试一下
<html>
<head>
<title>Close IE & Firefox</title>
<script>
function closeWindow()
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
window.open('','_self');
window.close();
}
</script>
</head>
<body>
<form>
<input type="button" name="CloseIE" value="Close IE" önclick="javascript:window.open('', '_self', ''); window.close();" /> It will close the window with out Alert
<input type="button" name="CloseFirefox" value="Close Firefox" önclick="closeWindow()" /> But it will close the window after the alert(due to Firefox security issue)
</form>
</body>
</html>
这篇关于关于使用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文