function openWindow(){
var myconfirm=confirm("是否打開網頁?");
if(myconfirm==true){
var myprom=prompt("請輸入打開網址:","http://www.xianlaiwan.cn");
window.open(myprom,'_blank','width=400px,height=500px,menubar=no,toolbar=no');
}
}
這樣代碼好像更簡潔一點
function hidetext()
{
document.getElementById("con").style.display="none";
}
function showtext()
{
document.getElementById("con").style.display="block";