課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
不會啊這題,沒有思路,誰來教教我啊
2016-07-14
源自:JavaScript入門篇 2-7
正在回答
檢查一下smarty的配置因為左右兩邊的div的position都設(shè)成了absolute,就是不占據(jù)空間的疊加在其他頁面元素之上,我說的比較簡單,建議仔細學習一下position屬性
? ? 要用prompt確認打開的網(wǎng)頁啊,還有設(shè)置默認值,這里是3個都要用啊。
function openWindow(){
? ? // 新窗口打開時彈出確認框,是否打開
? ? var msg=confirm("是否打開?");
? ? if(msg==true){
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
? ? var ad = prompt("請輸入網(wǎng)址:","http://idcbgp.cn/") ;
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? window.open(ad,'_blank0','width=400,height=500');
? ? }
? ?function openWindow ()
? ? {
? ? ? ? var name=confirm("你確定要打開網(wǎng)頁嗎?");
? ? ? ? if(name==trun)
? ? ? ? {
? ? ? ? ? ? window.open("http://idcbgp.cn/""windth=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes");
? ? ? ? }
? ? ? ? else
? ? ? ? ? ? alert("謝謝訪問");
? ? ? ? ? ??
? ??
<script type="text/javascript"> ?
? ? var boo = confirm("是否打開");
? ? if(boo){
? ? ? ? window.open("http://idcbgp.cn/", "_blank", "width=400,height=500, scrollbars=no, menu=no");
? </script>?
scrollbars=no, menu=no這兩個參數(shù)設(shè)置了看不出效果,無解。。。
p1.className是表示id="p1";的元素的class,給他賦值就是相當于修改了p1的class,p1.className="one";相當于p1那里變成了<p id="p1" class="one">xxx</p>;這樣就修改了樣式了。
<script type="text/javascript">
? function add(){
? ? ?var p1 = document.getElementById("p1");
? ? ?p1.className="one"
? }
? function modify(){
? ? ?var p2 = document.getElementById("p2");
? ? ?p2.className="two";
</script>
23婉 提問者 回復 qq_朱亞光_03625475
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ? function openWindow(){
? ? ? ? var msg = confirm("確定要打開網(wǎng)站的新窗口?");
? ? ? ? if(msg==true){
? ? ? ? ? ? prompt("請輸入要打開的網(wǎng)址?","http://idcbgp.cn")
? ? ? ? ? ? window.open("http://idcbgp.cn", "_blank", "width=400 height=500 menubar=no toolbar= no")
? ? ? ??
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
? ?var open;
? ?// 新窗口打開時彈出確認框,是否打開
var temp=confirm("是否要打開新的網(wǎng)頁?");
? if(temp)?
? ? ?open=prompt("請輸入你要打開的網(wǎng)址:","http://idcbgp.cn/");
? ? ?window.open(k_open,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? } ? ?
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http: ? ? ? ?//idcbgp.cn/
23婉 提問者
? ? ? ? var openwindows = confirm("彈出窗口?");
? ? ? ? if(openwindows==true)
? ? ? ? { ??
? ? ? ? ? ? openwindows=prompt("網(wǎng)址跳轉(zhuǎn)","http://idcbgp.cn/")
? ? ? ? ? ? window.open(openwindows,'_blank','width=400,height=500,menubar=no,toolbar=no');
舉報
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
2 回答這個不會取消啊..
5 回答學了半天這段不會打啊...
3 回答這道題不會寫?
3 回答取消不會?。?!
2 回答這個練習題不會?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2022-03-27
檢查一下smarty的配置因為左右兩邊的div的position都設(shè)成了absolute,就是不占據(jù)空間的疊加在其他頁面元素之上,我說的比較簡單,建議仔細學習一下position屬性
2016-07-14
? ? 要用prompt確認打開的網(wǎng)頁啊,還有設(shè)置默認值,這里是3個都要用啊。
function openWindow(){
? ? // 新窗口打開時彈出確認框,是否打開
? ? var msg=confirm("是否打開?");
? ? if(msg==true){
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
? ? var ad = prompt("請輸入網(wǎng)址:","http://idcbgp.cn/") ;
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? window.open(ad,'_blank0','width=400,height=500');
? ? }
? ? }
2016-07-14
? ?function openWindow ()
? ? {
? ? ? ? var name=confirm("你確定要打開網(wǎng)頁嗎?");
? ? ? ? if(name==trun)
? ? ? ? {
? ? ? ? ? ? window.open("http://idcbgp.cn/""windth=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes");
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? alert("謝謝訪問");
? ? ? ? }
? ? ? ? ? ??
? ? ? ? }
? ? ? ? }
? ??
2016-07-14
<script type="text/javascript"> ?
? ? // 新窗口打開時彈出確認框,是否打開
? ? var boo = confirm("是否打開");
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
? ? if(boo){
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? ? ? window.open("http://idcbgp.cn/", "_blank", "width=400,height=500, scrollbars=no, menu=no");
? ? }
? </script>?
scrollbars=no, menu=no這兩個參數(shù)設(shè)置了看不出效果,無解。。。
2016-07-14
p1.className是表示id="p1";的元素的class,給他賦值就是相當于修改了p1的class,p1.className="one";相當于p1那里變成了<p id="p1" class="one">xxx</p>;這樣就修改了樣式了。
<script type="text/javascript">
? function add(){
? ? ?var p1 = document.getElementById("p1");
? ? ?p1.className="one"
? }
? function modify(){
? ? ?var p2 = document.getElementById("p2");
? ? ?p2.className="two";
? }
</script>
2016-07-14
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ??
? ? // 新窗口打開時彈出確認框,是否打開
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? function openWindow(){
? ? ? ? var msg = confirm("確定要打開網(wǎng)站的新窗口?");
? ? ? ? if(msg==true){
? ? ? ? ? ? prompt("請輸入要打開的網(wǎng)址?","http://idcbgp.cn")
? ? ? ? ? ? window.open("http://idcbgp.cn", "_blank", "width=400 height=500 menubar=no toolbar= no")
? ? ? ? }
? ? }
? ? ? ??
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-07-14
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ?var open;
? ?// 新窗口打開時彈出確認框,是否打開
var temp=confirm("是否要打開新的網(wǎng)頁?");
? if(temp)?
? ? {
? ? ?open=prompt("請輸入你要打開的網(wǎng)址:","http://idcbgp.cn/");
? ? ?window.open(k_open,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? }
? ? } ? ?
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http: ? ? ? ?//idcbgp.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-07-14
function openWindow(){
? ? ? ? var openwindows = confirm("彈出窗口?");
? ? ? ? if(openwindows==true)
? ? ? ? { ??
? ? ? ? ? ? openwindows=prompt("網(wǎng)址跳轉(zhuǎn)","http://idcbgp.cn/")
? ? ? ? ? ? window.open(openwindows,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? }
? ? ? ? }