if(confirm("是否打开"))
{ var i=prompt("请输入","http://imooc.com/");
window.open("http://imooc.com/","_block","width=200","height=100");}
function con()
{
i.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="con()"/>
{ var i=prompt("请输入","http://imooc.com/");
window.open("http://imooc.com/","_block","width=200","height=100");}
function con()
{
i.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="con()"/>
<script type="text/javascript">
var mywin=window.open("http://www.imooc.com","_block","windth=200","height=150");
function closewindow()
{
mywin.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="closewindow()"/>
</body>
</html>
var mywin=window.open("http://www.imooc.com","_block","windth=200","height=150");
function closewindow()
{
mywin.close();
}
</script>
</head>
<body>
<input type="button" value="关闭" onclick="closewindow()"/>
</body>
</html>
2018-11-25
function openWindow(){
var i = confirm("打开 http://www.imooc.com/");
if(i == true ){
window.open("http://www.imooc.com/","_blanck","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400");
}else{
alert("打死你个龟孙!!!!!!!");
}
}
var i = confirm("打开 http://www.imooc.com/");
if(i == true ){
window.open("http://www.imooc.com/","_blanck","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400");
}else{
alert("打死你个龟孙!!!!!!!");
}
}
<title>confirm</title>
<script type="text/javascript">
function rec(){
var mymessage=confirm("你是智障吗?") ;
if(mymessage==true)
{
document.write("你是智障!");
}
else
{
document.write("你他妈才是智障!");
}
}
</script>
<script type="text/javascript">
function rec(){
var mymessage=confirm("你是智障吗?") ;
if(mymessage==true)
{
document.write("你是智障!");
}
else
{
document.write("你他妈才是智障!");
}
}
</script>
2018-11-16
<script type="text/javascript">
function newopen(){
if(confirm("确定打开新窗口吗?")){
var url=prompt("请输入一个网址:","http://imooc.com/");
window.open(url,"_blanck","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400")
}
}
</script>
function newopen(){
if(confirm("确定打开新窗口吗?")){
var url=prompt("请输入一个网址:","http://imooc.com/");
window.open(url,"_blanck","toolbar=no, menubar=no, scrollbars=yes, width=400, height=400")
}
}
</script>
function confirm(){ if(confirm("确定要取消设置吗?")){ var mychar=document.getElementById("txt"); mychar.style.color="black"; mychar.style.bakcgroundColor="white"; mychar.style.display="blcok"; mychar.style.width="600px"; mychar.style.height="400px";//样式恢复原样就行了// } }
document.getElementById("con")
这句byid中是大写的i,不是小写L,在图片中看起来大写i和小写l没什么区别。。。
这句byid中是大写的i,不是小写L,在图片中看起来大写i和小写l没什么区别。。。
2018-11-09