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

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

JavaScript入門篇

難度入門
時長 1小時35分
學習人數
綜合評分9.57
5510人評價 查看評價
9.8 內容實用
9.5 簡潔易懂
9.4 邏輯清晰
if(score>=90 && score<=100)
{
document.write("你很棒!");
}
else if(score>=75)
{
document.write("不錯吆!");
}
else if(score>=60)
{
document.write("要加油!");
}
else if(score>=0&&score<60)
{
document.write("你是蠢材嗎?");
}
else
{
document.write("你他媽搞事情是不?");
}
function openWindow(){
var m = confirm("是否打開新窗口?");
if(m == true){
var url = prompt("輸入你要打開的新網址!",'http://www.xianlaiwan.cn/');
if(url != null){
window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
}
菜鳥一枚,怎么才能進入下一章節?。??
window.open(http://www.xianlaiwan.cn/)
if(mymessage==true)
{ document.write("很好,加油!"); }
else
{ document.write("JS功能強大,要學習噢!"); }
</script>
}else if(id==3){
txt.style.display="block"
}else if(id==4){
var setting= confirm("你確定要取消設置么")
if(setting){
document.write("點擊了確定")
}else{
document.write("點擊了取消")
}
}
}
function chang(id){
var txt= document.getElementById("txt")
if(id==0){
txt.style.color="red"
txt.style.backgroundColor="#edd"
}else if(id==1){
txt.style.width="200"
txt.style.height="200"
}else if(id==2){
txt.style.display="none"
<input type="button" value="改變顏色" onclick="chang(0)" >
<input type="button" value="改變寬高" onclick="chang(1)">
<input type="button" value="隱藏內容" onclick="chang(2)">
<input type="button" value="顯示內容" onclick="chang(3)">
<input type="button" value="取消設置" onclick="chang(4)">
function openWindow(){
var isopen=confirm('是否打開網站');
if(isopen==true){
var url=prompt("輸入網址","http://www.xianlaiwan.cn")
if(url!=null){
window.open(url,'_bank','width=400,height=500,menubar=no,toolbar=no')
}
}
}
document.getElementById("con")
//:獲取到是這個p元素。
//而你想要的是P元素的文本。所以
document.getElementById("con").innerHTML;
//獲取里面的內容
?
代碼如此完美 卻沒有任何反應 服了了
這都太簡單了把
突然所有按鈕失效了,咋回事
兩種解法都可以,一種是按鈕直接復原,另一種是出現復位按鈕在復原
function openWindow()
{var mytext=prompt("請輸入網址:","http://www.xianlaiwan.cn/");
if(mytext!=null) {window.open(mytext,'_blank','height=500,width=400,menubar=no,toolbar=no');}
else
{alert("Thanks");}
}
課程須知
該課程是針對新手的一個簡單基礎的課程,讓您快速了解JS,通過一些簡單的代碼編寫體會JS。如果您已經對JS有所了解,可以跳過本課程,學習JS進階課程,進一步學習JS相應的基礎知識。學習本課程,希望您至少具備HTML/CSS基礎知識,認識常用的標簽。
老師告訴你能學到什么?
1. 理解JavaScript基礎語法; 2. 掌握常用語句的使用方法; 3. 學會如何獲取DOM元素及進行簡單操作。

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消