function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="inline"
}
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="inline"
}
2015-07-01
var openWindow=prompt("请输入网址:")
var myweb=openWindow
//输入格式为http://www.xxx.xxx
if (openWindow=true)
{
window.open(myweb,"_blank","width=400,height=500,menubar=no,toolbar=no")
}
else
{
window.open("http://www.imooc.com/","_blank","width=400,height=500,menubar=no,toolbar=no")
}
var myweb=openWindow
//输入格式为http://www.xxx.xxx
if (openWindow=true)
{
window.open(myweb,"_blank","width=400,height=500,menubar=no,toolbar=no")
}
else
{
window.open("http://www.imooc.com/","_blank","width=400,height=500,menubar=no,toolbar=no")
}
写个好玩的
var mywin = window.open("http://www.baidu.com");
var a = confirm("是否关闭弹出的窗口?");
if (a==true)
{
mywin.close();
}
var mywin = window.open("http://www.baidu.com");
var a = confirm("是否关闭弹出的窗口?");
if (a==true)
{
mywin.close();
}
2015-06-30
function openWindow(){
var one=confirm("是否打开新窗口");
if(one==true){
var two=prompt("请输入你要访问的地址");
window.open("http://www.imooc.com","_blank","width:400","height:500","menubar=no","toolsbar=no")
}else{
document.wirte("你不想打开任何页面")
}
}
var one=confirm("是否打开新窗口");
if(one==true){
var two=prompt("请输入你要访问的地址");
window.open("http://www.imooc.com","_blank","width:400","height:500","menubar=no","toolsbar=no")
}else{
document.wirte("你不想打开任何页面")
}
}
2015-06-29