function openWindow()
{
var open=confirm("是否打開網頁?");
if (open===true)
{
window.open('http://www.xianlaiwan.cn/','_bank','width=400px','heigh=500','menubar=no','toolbar=no');
}
else
{
window.close();
}
}
{
var open=confirm("是否打開網頁?");
if (open===true)
{
window.open('http://www.xianlaiwan.cn/','_bank','width=400px','heigh=500','menubar=no','toolbar=no');
}
else
{
window.close();
}
}
function openWindow()
{ var ensure=confirm("是否打開?");
if(ensure==true)
{var test=prompt("請輸入網址","www.xianlaiwan.cn");
window.open('test','_blank','width=400,height=500,top=100,toolbar=no,menubar=no'); }
else
{document.write("一邊玩去");}
}
{ var ensure=confirm("是否打開?");
if(ensure==true)
{var test=prompt("請輸入網址","www.xianlaiwan.cn");
window.open('test','_blank','width=400,height=500,top=100,toolbar=no,menubar=no'); }
else
{document.write("一邊玩去");}
}
<script type="text/javascript">
var mychar= document.getElementById("con");
document.write("原標題:"+mychar.innerHTML+"<br>"); //輸出原h2標簽內容
mychar.innerHTML = "Hello World!";
document.write("修改后的標題:"+mychar.innerHTML); //輸出修改后h2標簽內容
</script>
var mychar= document.getElementById("con");
document.write("原標題:"+mychar.innerHTML+"<br>"); //輸出原h2標簽內容
mychar.innerHTML = "Hello World!";
document.write("修改后的標題:"+mychar.innerHTML); //輸出修改后h2標簽內容
</script>
2016-04-27
onClick =" gaibiankuangao()">
function gaibianyanse()
{
var text = document.getElementById("txt");
text.style.color = "red";
text.style.backgroundColor = "#ccc";
}
function gaibiankuangao()
{
var text = document.getElementById("txt");
text.style.width = "300px";
text.style.height = "200px";
}
function gaibianyanse()
{
var text = document.getElementById("txt");
text.style.color = "red";
text.style.backgroundColor = "#ccc";
}
function gaibiankuangao()
{
var text = document.getElementById("txt");
text.style.width = "300px";
text.style.height = "200px";
}
<script type="text/javascript">
function openWindow(){
var lwq=confirm("確認打開新建窗口嗎?");
if(lwq==true)
{
window.open('url','http://www.xianlaiwan.cn/','width=400px,height=500px,menubar=no,toolbar=no');
}
else
{
window.clos();
}
}
</script>
function openWindow(){
var lwq=confirm("確認打開新建窗口嗎?");
if(lwq==true)
{
window.open('url','http://www.xianlaiwan.cn/','width=400px,height=500px,menubar=no,toolbar=no');
}
else
{
window.clos();
}
}
</script>
function openWindow(){
var myconfirm=confirm("是否打開?");
if(myconfirm==true){myurl();}
}
function myurl(){var myopen=prompt("請輸入網址","http://www.xianlaiwan.cn/");if(myopen!=null){mywidiow();}}
function mywidiow(){window.open('myopen','_blank','width=400','height=500','menubar=no','toolbar=no');}
var myconfirm=confirm("是否打開?");
if(myconfirm==true){myurl();}
}
function myurl(){var myopen=prompt("請輸入網址","http://www.xianlaiwan.cn/");if(myopen!=null){mywidiow();}}
function mywidiow(){window.open('myopen','_blank','width=400','height=500','menubar=no','toolbar=no');}