js ie下有效 showModalDialog 、showModelessDialog

时间:2014-05-09 09:48:02   收藏:0   阅读:292

 

bubuko.com,布布扣
 1         <input type="button" value="打开选择输入框"/>
 2         <script type="text/javascript">
 3 
 4       //IE有效 chrome无效       模式 与非模式 
 5          //window.showModalDialog("asdfasdf");
 6          //window.showModelessDialog("asdfasdf");
 7             //定位按钮,同时添加事件
 8             document.getElementsByTagName("input")[0].onclick=function(){
 9                 //以模式和非模式方式打开窗口
10                 var url = "childNodes.html";
11                 var sFeatures = "dialogHeight:400px;dialogWidth:200px;dialogLeft:20%";
12                 
13                 
14                 
15                 window.showModalDialog(url,null,sFeatures);//模式(用途较多)
16                 //window.showModelessDialog(url);//非模式
17             }
18         </script>
bubuko.com,布布扣

 

js ie下有效 showModalDialog 、showModelessDialog,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!