//定义"改变宽高"的函数
function change_size(){
settxt.style.width="300px";
settxt.style.height="400px";
}
//定义"隐藏内容"的函数
function hidden_txt(){
settxt.style.display="none";
}
//定义"显示内容"的函数
function display_txt(){
settxt.style.display="block";
}
function change_size(){
settxt.style.width="300px";
settxt.style.height="400px";
}
//定义"隐藏内容"的函数
function hidden_txt(){
settxt.style.display="none";
}
//定义"显示内容"的函数
function display_txt(){
settxt.style.display="block";
}
<script type="text/javascript">
var mywin=window.open("www.");
mywin.close();
</script>
var mywin=window.open("www.");
mywin.close();
</script>
2015-11-21
关闭新打开的窗口:
<script type="text/javascript">
var mywin=window.open("http://www..com");
mywin.close();
</script>
<script type="text/javascript">
var mywin=window.open("http://www..com");
mywin.close();
</script>
2015-11-21
<script type="text/javascript">
// document.write("开启JS之旅!I will be success!");
</script>
</head>
<body>
<p id="p1">开启JS之旅,I will be success!</p>
<script>
document.getElementById("p1").style.color="red";
</script>
中间加的代码,贴出来,刚开始学习js
// document.write("开启JS之旅!I will be success!");
</script>
</head>
<body>
<p id="p1">开启JS之旅,I will be success!</p>
<script>
document.getElementById("p1").style.color="red";
</script>
中间加的代码,贴出来,刚开始学习js
2015-11-20
function openWindow(){
var wopen=confirm('是否跳转?');
// 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/
if(wopen==true){
var web = window.prompt('请输入网址','http://www.imooc.com');
var mywindow = window.open(web,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
var wopen=confirm('是否跳转?');
// 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/
if(wopen==true){
var web = window.prompt('请输入网址','http://www.imooc.com');
var mywindow = window.open(web,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}