亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

JavaScript入門篇

難度入門
時長 1小時35分
學習人數
綜合評分9.57
5511人評價 查看評價
9.8 內容實用
9.5 簡潔易懂
9.4 邏輯清晰
容易理解,不錯!
function f(){
var s="引用JS文件!";
document.open();
document.write(s);
document.close();

}

</script>
</head>
<body onloda="f()">為什么用函數也不行
HTML文檔可以說由節點構成的集合,三種常見的DOM節點:

1. 元素節點:上圖中<html>、<body>、<p>等都是元素節點,即標簽。

2. 文本節點:向用戶展示的內容,如<li>...</li>中的JavaScript、DOM、CSS等文本。

3. 屬性節點:元素屬性,如<a>標簽的鏈接屬性href="http://www.xianlaiwan.cn"。
function openWindow(){
var info=confirm("要打開網頁嗎?");
if(info==true)
{
var mes='請輸入網址?';
var webUrl='http://www.xianlaiwan.cn';
webUrl=prompt(mes,webUrl)
{
window.open(webUrl,'width=400,height=500,toolbar=no,status=no');
}
}
else{}
}
function openWindow(){
var info=confirm("sure?");
if(info==true)
{
var mes='this?';
var webUrl='http://www.xianlaiwan.cn';
webUrl=prompt(mes,webUrl)
{
window.open(webUrl,'width=400,height=500,toolbar=no,status=no');
}
}
else{}
}
不是好難,學會調用方法!
function openWindow() {
var newWeb = confirm("是否打開新的網頁");
var newWeb = prompt("請輸入你要打開的網站", "http://www.xianlaiwan.cn/")
if (newWeb == "http://www.xianlaiwan.cn/") {
window.open('http://www.xianlaiwan.cn/', '_black', 'width = 400, height = 500, menubr = no, toolbar = no')
} else {
null;
}
}
完整的代碼
if (newWeb == "http://www.xianlaiwan.cn/") {
window.open('http://www.xianlaiwan.cn/', '_black', 'width = 400, height = 500, menubr = no, toolbar = no')

} else {
null;
}
}
function openWindow() {
var newWeb = confirm("是否打開新的網頁");
var newWeb = prompt("請輸入你要打開的網站", "http://www.xianlaiwan.cn/");
因為評論限制300個字 下面的代碼請看下一個回答。
function openWindow() {
var newWeb = confirm("是否打開新的網頁");
if (newWeb == true ) {
window.open('http://www.xianlaiwan.cn/', '_black', 'width = 400, height = 500, menubr = no, toolbar = no')

} else {
null;
}
}
url=prompt("輸入打開網址","http//www.xianlaiwan.cn/");
alert(url)
window.open(url,'_blank','width=400,height=600');

alert窗口顯示url是http//www.xianlaiwan.cn/
但是新窗口中打開的網址是“http://www.xianlaiwan.cn/code/http//www.xianlaiwan.cn/”,擅自添加了http://www.xianlaiwan.cn/code/
我怎么沒聽見有人在講的??
看不到啊,,啥情況。
課程須知
該課程是針對新手的一個簡單基礎的課程,讓您快速了解JS,通過一些簡單的代碼編寫體會JS。如果您已經對JS有所了解,可以跳過本課程,學習JS進階課程,進一步學習JS相應的基礎知識。學習本課程,希望您至少具備HTML/CSS基礎知識,認識常用的標簽。
老師告訴你能學到什么?
1. 理解JavaScript基礎語法; 2. 掌握常用語句的使用方法; 3. 學會如何獲取DOM元素及進行簡單操作。

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消