function openWindow(){
// 新窗口打开时弹出确认框,是否打开
if(confirm("?")){
// 通过输入对话框,确定打开的网址,默认为
var url = prompt("","http:");
//打开的窗口要求,宽400像素,高500像素,无菜单栏、无工具栏。
window.open( url,"_blank"," width=400, height=500, menubar=no, toolbar=no");
}
}
// 新窗口打开时弹出确认框,是否打开
if(confirm("?")){
// 通过输入对话框,确定打开的网址,默认为
var url = prompt("","http:");
//打开的窗口要求,宽400像素,高500像素,无菜单栏、无工具栏。
window.open( url,"_blank"," width=400, height=500, menubar=no, toolbar=no");
}
}
shuruwww=prompt("请确认所打开的网址:","https://www.baidu.com");
window.open(shuruwww,'_blank','width=400,height=500,menubar=no,toolbar=no');
isopen=confirm("新窗口是否已经打开?");
if(isopen==true){
alert("新窗口已经打开!");
}
else{
alert("新窗口没有打开!");
}
window.open(shuruwww,'_blank','width=400,height=500,menubar=no,toolbar=no');
isopen=confirm("新窗口是否已经打开?");
if(isopen==true){
alert("新窗口已经打开!");
}
else{
alert("新窗口没有打开!");
}
var getid=document.getElementById("txt");
//定义"改变颜色"的函数
function color(){
getid.style.color="white";
getid.style.backgroundColor="red";
}
//定义"改变宽高"的函数
function wh(){
getid.style.width=500+"px";
getid.style.height=500+"px";
}
//定义"改变颜色"的函数
function color(){
getid.style.color="white";
getid.style.backgroundColor="red";
}
//定义"改变宽高"的函数
function wh(){
getid.style.width=500+"px";
getid.style.height=500+"px";
}
//定义"取消设置"的函数
function changset(){
if( confirm("取消") ){
var cc=document.getElementById("txt");
cc.style.width="600px";
cc.style.height="400px";
cc.style.display="block";
cc.style.color="";
cc.style.backgroundColor="";
}
}
function changset(){
if( confirm("取消") ){
var cc=document.getElementById("txt");
cc.style.width="600px";
cc.style.height="400px";
cc.style.display="block";
cc.style.color="";
cc.style.backgroundColor="";
}
}
//定义"改变颜色"的函数
function changcolor(){
var cc=document.getElementById("txt");
cc.style.color="#red";
cc.style.backgroundColor="#3399ff";
}
//定义"改变宽高"的函数
function changwidth(){
var cc=document.getElementById("txt");
cc.style.width="300px";
cc.style.height="300px";
function changcolor(){
var cc=document.getElementById("txt");
cc.style.color="#red";
cc.style.backgroundColor="#3399ff";
}
//定义"改变宽高"的函数
function changwidth(){
var cc=document.getElementById("txt");
cc.style.width="300px";
cc.style.height="300px";
已采纳回答 / 慕用4124784
function openWindow(){ var windows="http://www.imooc.com/" var openwin=prompt("请输入你要打开的网址",windows) // 新窗口打开时弹出确认框,是否打开 if(openwin){ // 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/ var win=window.open(windows,"_blank","width=400, ...
2016-06-17