function openWindow(){
var ask=confirm("是否打開新窗口?");
if(ask){
var url=prompt("請輸入網址",'http://www.xianlaiwan.cn/');
window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');
}else{
alert('你沒有打開新窗口');
}
}
var ask=confirm("是否打開新窗口?");
if(ask){
var url=prompt("請輸入網址",'http://www.xianlaiwan.cn/');
window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');
}else{
alert('你沒有打開新窗口');
}
}
function wopen(){
var xw=confirm('是否新建窗口?');
if(xw==true){
var url=prompt('請輸入網址', 'http://www.xianlaiwan.cn');
if(url){
window.open(url,'_blank','width=400,height=400;left=100,top=200');
}else{
document.write('你沒有打開新窗口');
}
}else{
document.write('你沒有打開新窗口');
//wopen();
}
}
var xw=confirm('是否新建窗口?');
if(xw==true){
var url=prompt('請輸入網址', 'http://www.xianlaiwan.cn');
if(url){
window.open(url,'_blank','width=400,height=400;left=100,top=200');
}else{
document.write('你沒有打開新窗口');
}
}else{
document.write('你沒有打開新窗口');
//wopen();
}
}
2016-05-26
<script type="text/javascript">
function rec(){
var mymessage=confirm("你覺得自己帥不帥?");
if(mymessage==true)
{
document.write("嗯!你真的很帥");
}
else
{
document.write("那你一定很漂亮");
}
}
</script>
function rec(){
var mymessage=confirm("你覺得自己帥不帥?");
if(mymessage==true)
{
document.write("嗯!你真的很帥");
}
else
{
document.write("那你一定很漂亮");
}
}
</script>
2016-05-26
function openWindow(){
alert("確認打開網站?");
window.open("http://www.xianlaiwan.cn","_blank","windth=400","height=500","menubar=no","toolbar=no");
}
alert("確認打開網站?");
window.open("http://www.xianlaiwan.cn","_blank","windth=400","height=500","menubar=no","toolbar=no");
}