<script type="text/javascript">
function openWindow(){
var o=confirm("是否打開新網址?");
var h;
if(o==true)
{
h=prompt("你要打開的網址");
if(h!=null){
window.open(h, "_blank","width=400,height=500,toolbar=no,munebar=no");}
}
else
{}
}
function openWindow(){
var o=confirm("是否打開新網址?");
var h;
if(o==true)
{
h=prompt("你要打開的網址");
if(h!=null){
window.open(h, "_blank","width=400,height=500,toolbar=no,munebar=no");}
}
else
{}
}
<script type="text/javascript">
function rec(){
var message = confirm("新窗口打開網站");
if(message == true){
window.open("http://www.xianlaiwan.cn","width=400px,height=500px,top=100px,left=0,menubar=no,toolbar=0");
}
else{
}
}
</script>
function rec(){
var message = confirm("新窗口打開網站");
if(message == true){
window.open("http://www.xianlaiwan.cn","width=400px,height=500px,top=100px,left=0,menubar=no,toolbar=0");
}
else{
}
}
</script>
這題也是醉了吧。。。
任務
在右邊編輯器第8行代碼,補充代碼,打開http://www.xianlaiwan.cn網頁,將在新窗體中打開,寬為600,高為400,距屏頂100像素,屏左0像素。當點擊按鈕時,打開新窗口。
?不會了怎么辦
window.open('http://www.xianlaiwan.cn','_blank','height=600,width=400,top=100,left=0');
我檢查了半天還以為怎么錯了。結果題目要求的寬600高400,答案卻是寬400高600,我交換了倆屬性的值就通過了,不交換就不讓我通過。
神一般的答案。。。
任務
在右邊編輯器第8行代碼,補充代碼,打開http://www.xianlaiwan.cn網頁,將在新窗體中打開,寬為600,高為400,距屏頂100像素,屏左0像素。當點擊按鈕時,打開新窗口。
?不會了怎么辦
window.open('http://www.xianlaiwan.cn','_blank','height=600,width=400,top=100,left=0');
我檢查了半天還以為怎么錯了。結果題目要求的寬600高400,答案卻是寬400高600,我交換了倆屬性的值就通過了,不交換就不讓我通過。
神一般的答案。。。
2019-04-01
function openWindow(){
var open=confirm('是否打開新的網址');
if(open==true){
window.open('http://www.xianlaiwan.cn','width=400,height=500,menuber=no,toolbar=no');
}else{
alert('退出');
}
}
共同參考
var open=confirm('是否打開新的網址');
if(open==true){
window.open('http://www.xianlaiwan.cn','width=400,height=500,menuber=no,toolbar=no');
}else{
alert('退出');
}
}
共同參考
<script type="text/javascript">
function openWindow(){
var asd=confirm("是否打開");
if(asd==true){
window.open('http://www.xianlaiwan.cn','width=400,height=500,menubar=no,toolbar=no');
}
else{}
}
function openWindow(){
var asd=confirm("是否打開");
if(asd==true){
window.open('http://www.xianlaiwan.cn','width=400,height=500,menubar=no,toolbar=no');
}
else{}
}
<script type="text/javascript">
function openWindow(){
var msg=confirm("是否打開");
if(true==msg)
{
var page= prompt("輸入網址","http://www.xianlaiwan.cn/");
window.open(page,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
</script>
function openWindow(){
var msg=confirm("是否打開");
if(true==msg)
{
var page= prompt("輸入網址","http://www.xianlaiwan.cn/");
window.open(page,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
</script>