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

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

JavaScript入門篇

難度入門
時長 1小時35分
學習人數
綜合評分9.57
5511人評價 查看評價
9.8 內容實用
9.5 簡潔易懂
9.4 邏輯清晰
<script type="text/javascript">
var mychar= document.getElementById("con");
mychar.style.color="red";
mychar.style.backgroundColor="#ccc";
mychar.style.width="300px";

</script>
function openwindow(){
var mymessage;
message=prompt("新窗口打開網站")
if(mymessage==true)
{window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes')}
else
{null}
}
function add(){
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className="two";
}
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
var mychar=document.getElementById("con");
mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
break;
case 1: tdiv.style.width='300px';
tdiv.style.height='300px';
break;
case 2:tdiv.style.display='none';
break;
case 3:tdiv.style.display='block';
break;
case 4:var x=confirm("are you sure quxiao");
if(x){
tdiv.removeAttribute('style');}
break;
}}}}
window.onload =function(){
var tdiv=document.getElementById('txt');
var bt=document.getElementsByTagName('input');
for(var i=0;i<bt.length;i++)
{
bt[i].index=i;
bt[i].onclick=function (){

switch (this.index){
case 0:
tdiv.style.color='red';
tdiv.style.backgroundColor='yellow';
函數必須聲明function 否則是沒辦法調用的
<script type="text/javascript">
function Wopen(){
window.open('http://www.xianlaiwan.cn','_blank','width=600','height=400','top=100','left=0')
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >
function openWindow(){
var conf=confirm('new window?');// 新窗口打開時彈出確認框,是否打開
if (conf){
var addr= prompt('addr ?','http://www.xianlaiwan.cn/');// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open(addr,'haha','width=400,height=500,menubar=no,toolbar=no');}
}
mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
safari下僅寬度有效,高度,頂部,左端均無效。
我已經離神不遠了
什么也沒填就
Nice,官人你這是年薪過百萬的節奏啊!
我知道! 這是二叉樹模型 說白了和思維導圖一樣 不斷的分支 發散
課程須知
該課程是針對新手的一個簡單基礎的課程,讓您快速了解JS,通過一些簡單的代碼編寫體會JS。如果您已經對JS有所了解,可以跳過本課程,學習JS進階課程,進一步學習JS相應的基礎知識。學習本課程,希望您至少具備HTML/CSS基礎知識,認識常用的標簽。
老師告訴你能學到什么?
1. 理解JavaScript基礎語法; 2. 掌握常用語句的使用方法; 3. 學會如何獲取DOM元素及進行簡單操作。

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消