function openWindow(){
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
var mymessage =confirm("是否打开");
var open;
if (mymassage=true){
open=prompt("确定打开?"," http://www.imooc.com/");
}
}
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
var mymessage =confirm("是否打开");
var open;
if (mymassage=true){
open=prompt("确定打开?"," http://www.imooc.com/");
}
}
//定义"隐藏内容"的函数
aInput[2].onclick=function(){
txt.style.display='none';
}
//定义"显示内容"的函数
aInput[3].onclick=function(){
txt.style.display='block';
}
aInput[2].onclick=function(){
txt.style.display='none';
}
//定义"显示内容"的函数
aInput[3].onclick=function(){
txt.style.display='block';
}
//定义"改变颜色"的函数
var aInput=document.getElementsByTagName('input');
var txt=document.getElementById('txt');
aInput[0].onclick=function(){
txt.style.color="yellowgreen";
}
//定义"改变宽高"的函数
aInput[1].onclick=function(){
txt.style.width='800px';
txt.style.height='200px';
}
var aInput=document.getElementsByTagName('input');
var txt=document.getElementById('txt');
aInput[0].onclick=function(){
txt.style.color="yellowgreen";
}
//定义"改变宽高"的函数
aInput[1].onclick=function(){
txt.style.width='800px';
txt.style.height='200px';
}
<script type="text/javascript">
function Wopen(){
window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0')
}
</script>
function Wopen(){
window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0')
}
</script>
2016-03-13
已采纳回答 / 张张张090
()必须加的,因为add2()是一个函数,加了括号才完整。里面不用写其他内容。必须加入,括号里面可以设置形参,需要时候可以传入参数进去,不需要时候就默认为空。
2016-03-13
已采纳回答 / CrazyDog333
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>document.write</title> <script type="text/javascript"> a = 0xafe; document.write("0xafe转为10进制为:"+a.toStri...
2016-03-13
最赞回答 / 流逝的回忆已成空白
var 是声明变量 mychar 是变量名 就是存储变量的 而 后面重复给mychar赋值了 这个就好比我们电脑文件一样、当你桌面之前有一个mychar这样的一个记事本文件、而后边你又要写一个mychar文件的时候、他就会提示你 是否是赋值呢还是新建呢?也会告诉你文件名重复了!这里意思也是一样的、不允许变量名重复!重复 要么把之前内容覆盖 要么修改变量名 只有这样才能在同一个地方放下这两个量! 这个因该很好理解吧?简单易懂!
2016-03-13