var myage=alert(111)
if(myage==true){document.write(111)}
else(document.write(2123))
if(myage==true){document.write(111)}
else(document.write(2123))
2021-05-22
function openWindow(){
var conf=confirm("是否打开");
if(conf==true)
{
var newurl=prompt("请输入网址","http://www.imooc.com/");
var mywin=window.open(newurl,'_blank','width=400,height=500');
}else{
alert("Follow your order!");
}
}
var conf=confirm("是否打开");
if(conf==true)
{
var newurl=prompt("请输入网址","http://www.imooc.com/");
var mywin=window.open(newurl,'_blank','width=400,height=500');
}else{
alert("Follow your order!");
}
}
function openWindow()
{
var conf = confirm("Do you sure open the new windows?");
if (conf)
{
var newwin = prompt("Please Input Url","http://www.imooc.com/");
var mywin = window.open(newwin);
}
else
{
alert("Follow your order!");
}
}
{
var conf = confirm("Do you sure open the new windows?");
if (conf)
{
var newwin = prompt("Please Input Url","http://www.imooc.com/");
var mywin = window.open(newwin);
}
else
{
alert("Follow your order!");
}
}
<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>
2021-01-21
document.write("hello");
document.getElementById("p1").style.color="blue";
document.getElementById("p1").style.color="blue";
2021-01-21
function openWindow(){
var open=confirm("是否打开新的窗口?")
if(open==true)
{var t =prompt("请输入网址")
if(t='http://www.imooc.com')
{window.open(t,'test','width=400,height=500,menubar=no,toolbar=no') }
else{document.write("请输入正确的网址")}}
else{document.write("ok")}}
var open=confirm("是否打开新的窗口?")
if(open==true)
{var t =prompt("请输入网址")
if(t='http://www.imooc.com')
{window.open(t,'test','width=400,height=500,menubar=no,toolbar=no') }
else{document.write("请输入正确的网址")}}
else{document.write("ok")}}