function openWindow(){
var result=confirm('是否打开对话框?');
if(result){
var location=prompt('请输入需要打开的网页地址:',' http://www.imooc.com/');
if(location){
window.open(location,'_blank','width=400,height=500,menubar=no ,toolbar=no');
}
}
}
var result=confirm('是否打开对话框?');
if(result){
var location=prompt('请输入需要打开的网页地址:',' http://www.imooc.com/');
if(location){
window.open(location,'_blank','width=400,height=500,menubar=no ,toolbar=no');
}
}
}
iOS程序猿写的:
var text = document.getElementById("txt");
function changeColor(){
text.style.color = "red";
text.style.backgroundColor = "#CCC";
}
//定义"改变宽高"的函数
function changeSize(){
text.style.width = "200px";
text.style.height = "400px";
}
var text = document.getElementById("txt");
function changeColor(){
text.style.color = "red";
text.style.backgroundColor = "#CCC";
}
//定义"改变宽高"的函数
function changeSize(){
text.style.width = "200px";
text.style.height = "400px";
}