`
shoushounihao
  • 浏览: 39423 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

showModalDialog

 
阅读更多

弹出框的使用

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">
//status 是否显示状态栏 help是帮助栏提示

function test()
{
  alert('haha');
}

   function openDialog()
   {
    var result = window.showModalDialog("2.html","","dialogHeight:200px;dialogWidth:200px;edge:sunken;help=no;status=no"); 
    //alert(result);
    document.getElementById("user1").value=result;
   }

</script>
</head>
<body>
<input type="button" onclick="test()">

    <button id="dialog" onclick="openDialog()">打开对话框</button>
    <input name="user1" id="user1" type="text">

</body>
</html>

 

 

对应2.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">
function closeWindow()
{
 alert( window.dialogArguments);
 window.returnValue = "biaobiao"; 
 window.close(); 
}

</script>
</head>
<body>
<div> 
    <form> 
        收件人:<input type="text"> 
       主题:<input type="text"> 
        内容:<textarea></textarea> 
    </form> 
    <a href="http://www.cnblogs.com/hynxy0115/archive/2009/03/18/1415654.html">href</a
    <input type="button" onclick="closeWindow()" value="关闭窗口"/> 
</div> 

</body>
</html>

 

json--java之间转换

http://www.blogjava.net/xcp/archive/2008/10/31/json2.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics