您的位置:首页 > Web前端 > JavaScript

js自定义网页对话框及同页面获得信息

2011-07-14 12:28 316 查看
<html>

<head>

<script type="text/javascript">

function openwin() {

window.showModalDialog("page.html",window,"status:no;scroll:no;dialogWidth:235px;dialogHeight:100px");

}

function show(){

var mes=document.getElementById('textid').value;

document.getElementById('mesid').innerHTML=mes;

}

</script>

</head>

<body>

<a href="#" onclick="openwin()">打开一个窗口</a>

<span>

在这里要对window.open里的参数做一下说明:<br>

fullscreen=no 窗口模式,yes为全屏模式<br>

toolbar=no, 显示工具条<br>

  location=no,显示网址栏<br>

  directories=no,导航条<br>

  status=no,状态条<br>

  menubar=no,菜单<br>

  scrollbars=no,滚动条<br>

  resizable=no,是否可以改变大小<br>

  copyhistory=no,历史按钮<br>

  width=350,宽<br>

  height=140'高<br>

  left=200,距离左边200<br>

  top=300,距离顶端300<br>

<span>

<br><br>

<input type="text" id='textid' name="text1" onchange="show();"/><br>

<span id="mesid"></span>

</body>

</html>

附件:http://down.51cto.com/data/2358537
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息