完美通過了
function Wopen(){ ? ?var char=confirm("是否打開新窗口?"); ? ?if (char==true) { ? ? var mychar=prompt('請輸入網(wǎng)址',value='http://idcbgp.cn'); ? ? if (mychar!=null) { ? ? window.open(mychar,'_blank','width=500px','height=400px','width=400','height=500','menubar=no','toolbar=no'); ? ? ? ?} ? ?} }
2016-05-25
有一點我也是不會,就是默認網(wǎng)址那里我設(shè)了。
但是輸入別的網(wǎng)址就鏈接不上了
2016-05-25
function wopen{
????????var char=confirm("是否打開新窗口");
????????if( char ==ture ){
????????????????var mychar=prompt("請輸入網(wǎng)址",“”);
}
????????if(char!=null){
???????? ? window.open("www.baidu.com",pm,'_blank','width=400,heigh=500,menubar=no,toolbar=no');
}
}
2016-05-25
? function Wopen(){ ??
?????????????var char=confirm("是否打開新窗口?"); ??
?????????????if (char==true) { ? ?
????????????????????var mychar=prompt("請輸入網(wǎng)址","http://idcbgp.cn"); ? ?
?????????????????????????????if (mychar!=null) { ? ? ? ? ? ? ? ? ? ? ? ? ? window.open(mychar,'_blank','width=500px','height=400px','width=400','height=500','menubar=no','toolbar=no'); ? ? ? ?} ?
?else {
alert("bye");}
?}
else{alert("bye");}
?}
2016-05-25
?function openWindow(){
? ? ? ? var con = confirm("是否要輸入網(wǎng)址");
? ? ? ? if(con==true){
? ? ? ? ? ? var pro = prompt("請輸入網(wǎng)址","http://idcbgp.cn");
? ? ? ? ? ? if(pro!=null&&pro!=""){
? ? ? ? ? ? ? ? window.open(pro,"_blank","width=400,height=500,mentbar=no,toolbar=no");
? ? ? ? ? ? }
? ? ? ? ? ? else{
? ? ? ? ? ? ? ? alert("請輸入正確的網(wǎng)址");
? ? ? ? ? ? }
? ? ? ? }
? ? }
我這樣就行了
2016-05-25
你那樣雖然也可以顯示,但是寬高沒效果。
第一點。寬高重復。第二點,寬高那里只要一個雙引號就行了,不用都加的
2016-05-25
你這還完美嗎?
window.open(mychar,'_blank','width=500,height=400,menubar=no,toolbar=no')
這一條就錯了兩點了,要我這樣寫才有用