js打开、关闭页面和运行代码那些事

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="智能社 - zhinengshe.com">
<meta name="copyright" content="智能社 - zhinengshe.com">
<title>智能社 - www.zhinengshe.com</title>
</head>
<body>
<input type="button" value="打开" onclick="window.open('http://www.baidu.com'), '_self'" />
<input type="button" value="关闭" onclick="window.close();" />
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="智能社 - zhinengshe.com">
<meta name="copyright" content="智能社 - zhinengshe.com">
<title>智能社 - www.zhinengshe.com</title>
<style> </style>
<script>
window.onload=function (){
var oBtn=document.getElementById('btn');
var oText=document.getElementById('text');
oBtn.onclick=function (){
var oNewWidnow=window.open('about:blank', '_blank');
oNewWidnow.document.write(oText.value);
}; };
</script>
</head> <body>
<textarea cols="" rows="" id="text"></textarea>
<input type="button" value="运行" id="btn" />
</body>
</html>

js打开、关闭页面和运行代码那些事js打开、关闭页面和运行代码那些事

上一篇:pdfcrop不能使用


下一篇:As3.0 类的【枚举】