<script>
document.write("开启JS之旅!");
</script>
就行
document.write("开启JS之旅!");
</script>
就行
2016-03-05
prompt(str1,str2);str1为显示出来的内容不可更改,str2是要输入的部分。个人看法
2016-03-05
function rec(){
var mymessage=confirm("你是基佬 ");
if(mymessage==true)
{
document.write("你这个死基佬!");
}
else
{
document.write("搞基才是真爱!");
}
}
rec()
var mymessage=confirm("你是基佬 ");
if(mymessage==true)
{
document.write("你这个死基佬!");
}
else
{
document.write("搞基才是真爱!");
}
}
rec()
2016-03-05
function openWindow(){
var iff=confirm("是否新建网站")
if(iff==true)
{
window.open('http://www.imooc.com/','_blank','width=400,height=500,menubar=no,toolbar=no')
}else{
}
}
var iff=confirm("是否新建网站")
if(iff==true)
{
window.open('http://www.imooc.com/','_blank','width=400,height=500,menubar=no,toolbar=no')
}else{
}
}
最新回答 / 栖息在月亮上的麻雀
()是用来写一些参数的,有些函数定义好后在()中需要你直接写入一些参数,比较简单的函数就不用写,直接一个空的(),调用本身是一个行为,属于javascript,当然是在这个标签里的
2016-03-05
function openWindow(){
var mes=confirm("是否要打开新网站");
if(mes){
var mes1=prompt("请输入您要打开的网址","http://www.imooc.com");
if(mes1){
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
}
}
var mes=confirm("是否要打开新网站");
if(mes){
var mes1=prompt("请输入您要打开的网址","http://www.imooc.com");
if(mes1){
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
}
}