MyHtml.html
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
window.onclick = function(){
var oText = document.getElementById("text1");
var oBtn = document.getElementById("btn1");
oBtn.onclick = function (){
//var oNewWin = window.open("about:blank");//打开新窗口
//oNewWin.document.write(oText.value);
//alert(window.navigator.userAgent);//显示浏览器类型
//alert(window.location);//显示页面地址 或者也可以把地址赋值给location
//alert(document.documentElement.clientWidth);//显示当前可视区
};
//alert(document.documentElement.scrollTop);//距离上方所滚动的距离
//var a = confirm(1);//选择按钮,有布尔返回值
//alert(a);
var mes = prompt("请输入访问密码","");//弹框
alert(mes);
};
</script>