function openWindow(){
var result=confirm('是否打開對話框?');
if(result){
var location=prompt('請輸入需要打開的網頁地址:',' http://www.xianlaiwan.cn/');
if(location){
window.open(location,'_blank','width=400,height=500,menubar=no ,toolbar=no');
}
}
}
var result=confirm('是否打開對話框?');
if(result){
var location=prompt('請輸入需要打開的網頁地址:',' http://www.xianlaiwan.cn/');
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";
}
<input type="button" value="改變顏色" onclick="gbys()">
<input type="button" value="改變寬高" onclick="gbkg()">
<input type="button" value="隱藏內容" onclick="ycnr()">
<input type="button" value="顯示內容" onclick="xsnr()">
<input type="button" value="取消設置" onclick="qxsz()">
<input type="button" value="改變寬高" onclick="gbkg()">
<input type="button" value="隱藏內容" onclick="ycnr()">
<input type="button" value="顯示內容" onclick="xsnr()">
<input type="button" value="取消設置" onclick="qxsz()">