登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

820716的博客-知识分享 向上的心!

知识分享 开阔向上的心胸! http://www.820716.net/blog

 
 
 

日志

 
 

一个用showModalDialog打开窗口,用window.returnValue返回值的例子  

2009-03-18 20:30:04|  分类: 个人日记 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
http://mail.139.com  RSS 资讯中心  编辑RSS种子的时候 使用了showModalDialog方法。

<!--a.htm-->  
    
  <script   language="JavaScript">  
  <!--  
  /*@cc_on   @*/  
  /*@if   (@_win32   &&   @_jscript_version>=5)  
  function   window.confirm(strText){  
  var  
pWin=window.showModalDialog("b.htm",strText,"dialogHeight:116px;  
dialogWidth:232px;   help:   No;   resizable:   no;   status:   No;  
scroll:no;   dialogTop:"+(screen.height-116)/2+"px;  
dialogLeft:"+(screen.width-232)/2+"px;");  
  }  
  @end   @*/  
  confirm("真的要删除吗?");  
  //-->  
  </script>  
    
    
  <!--b.htm-->  
    
  <html>  
  <head>  
  <style   type="text/css">  
  body{   }  
  td,input{   font-size:12px}  
  </style>  
  <script   language="JavaScript">  
  <!--  
  var   str      =      window.dialogArguments;  
  function   doOk(){window.returnValue="yes";window.close();}  
  function   doCancel(){window.returnValue="no";window.close();}  
  var   timer=null;  
  function   setTimer(){timer=window.setTimeout("doOk()",3000);}  
  document.onclick=function   (){document.getElementById("btnOk").focus();}  
  document.oncontextmenu=function   (){document.getElementById("btnOk").focus();}  
  //-->  
  </script>  
  <title   align="center">--==提示信息==--</title>  
  </head>  
  <body   style="background-color:buttonface;   margin:0"   onload="setTimer();">  
  <table   cellpadding="0"   cellspacing="0"   border="0"   width="100%"   height="100%">  
  <tr   height="65%">  
  <td   width="25%"   align="center"   valign="center"><img  
src="warning.gif"   style="width:32px;   height:32px"></td>  
  <td   valign="middle">  
  <script   language="JavaScript">  
  <!--  
  document.write(str);  
  //-->  
  </script>  
  </td>  
  </tr>  
  <tr   height="35%">  
  <td   colspan="2"   align="center"   valign="top">  
  <input   type="button"   id="btnOk"   value="      确定      "   onclick="doOk()">  
  <input   type="button"   id="btnOk"   value="      取消      "   onclick="doCancel()">  
  </td>  
  </tr>  
  </table>  
  </body>  
  <html>  

------------------
陈龙
QQ:84047848
MSN:dragonchen82@hotmail.com



 
  评论这张
 
阅读(1718)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018