一章 職業(yè)規(guī)劃和前景
第二章 html基本結(jié)構(gòu)
<html> <head></head> <body></body> </html>
第三章 html基本標(biāo)簽
<marquee direction="down" loop="4" onmouseover=this.stop() onmouseout=this.start()></marquee>
onmouseover=this.stop() onmouseover=this.start() scrollamout="1"(滾動(dòng)速度)
第四章 img圖片標(biāo)簽與路徑
第五章 三種列表的講解
<ul> <li></li> <li></li> <li></li> </ul>
<ol> <li>內(nèi)容一</li> <li>內(nèi)容二</li> <li>內(nèi)容三</li> </ol>
<ul> <li>柚子 <ul> <li>沙田柚</li> <li>蜜柚</li> </ul> </li> <li>荔枝</li> <li>蘋果</li></ul>
<ol> <li>茶 <ul> <li>紅茶</li> <li>綠茶</li> </ul> </li> <li>果汁</li> <li>牛奶</li></ol>
<dl> <dt>pc網(wǎng)頁(yè)制作</dt> <dd>學(xué)習(xí)DIV+CSS JS JQ 項(xiàng)目實(shí)戰(zhàn)</dd> <dt>手機(jī)網(wǎng)頁(yè)制作</dt> <dd>手機(jī)網(wǎng)頁(yè)制作實(shí)戰(zhàn)</dd> </dl>
<dl> <dt>中國(guó)城市</dt> <dd>北京 </dd> <dd>上海 </dd> <dd>廣州 </dd> <dt>美國(guó)城市</dt> <dd>華盛頓 </dd> <dd>芝加哥 </dd> <dd>紐約 </dd> </dl>
第六章 表單元素(上)
<form> <input type="text"/> </form>
<form action="html.do" method="get"> username: <input type="text" name="user" /> <input type="submit" value="提 交" /> </form>
<form> <input type="hidden" name="hid" value="value"> </form>
<input type="text" name="" value="今天心情不錯(cuò)" /> <input type="radio" name="" value="" checked="checked"> <input type="checkbox" name="" value="" checked="checked"> <select name="" > <option value=""></option> <option value="" selected="selected"></option> <select>
<p>單向選擇</p> <label for="male">男:</label><input type="radio" name="sex" id="male"/> <label for="nv">女:</label><input type="radio" name="sex"checked="check"/>
第七章 表單和表格(下)
<form> <select name="" id=""> <option value="1">1月</option> <option value="2">2月</option> </select> </form>
<table border="1"> <tr> <td>姓名</td> <td>性別</td> </tr> </table>
<table border="1"> <tr> <td>姓名</td> <td>性別</td> </tr> <tr> <td>姓名</td> <td>性別</td> </tr> </table>
<table border="1"> <tr> <td >姓名</td> <td>性別</td> <td>愛(ài)好</td> </tr> </table>
第一部分總結(jié):
HTML部分導(dǎo)圖總結(jié)
學(xué)習(xí)從來(lái)不是一個(gè)人的事情,要有個(gè)相互監(jiān)督的伙伴,想要學(xué)習(xí)或交流前端問(wèn)題的小伙伴可以私信“學(xué)習(xí)”小明加群獲取2019web前端最新入門資料,一起學(xué)習(xí),一起成長(zhǎng)!
認(rèn)證的站長(zhǎng)暫時(shí)還不能使用代碼,
可以先認(rèn)證再插入代碼
html組件和js組件使用權(quán)限限制
*頁(yè)面: 只允許經(jīng)過(guò)認(rèn)證的用戶使用html組件和js組件
*文章: 只允許經(jīng)過(guò)認(rèn)證的用戶使用js組件
html組件和js組件只允許使用規(guī)定的標(biāo)簽
*html組件: a, code, pre, blockquote, ul, ol, li, table, thead, tbody, tfoot, tr, td, th, dd, dl, dt, s, u, b, i, font, span, strong, br, em, hr, sub, sup, div, section, p, h1, h2, h3, h4, h5, h6, vedio, audio, svg, img, style, iframe, fidldset, animate, text, tspan
*js組件: , a, code, pre, blockquote, ul, ol, li, table, thead, tbody, tfoot, tr, td, th, dd, dl, dt, s, u, b, i, font, span, strong, br, em, hr, sub, sup, div, section, p, h1, h2, h3, h4, h5, h6, vedio, audio, svg, img, style, iframe, fidldset, animate, text, tspan
所有標(biāo)簽屬性限制
*不允許使用on開(kāi)頭的屬性名
快站的技術(shù)小哥哥們限定了以上可使用的標(biāo)簽,如果有所補(bǔ)充歡迎在下方留言回復(fù),或點(diǎn)擊【閱讀原文】在社區(qū)中回復(fù),我們會(huì)考慮酌情開(kāi)放
更多快站資訊,點(diǎn)擊進(jìn)入快站官網(wǎng)(www.kuaizhan.com)
avascript原生阻止冒泡
<html>
<head>
<style type="text/css">
#hide{width:75%;height:80px;background:skyblue;display:block;}
.hander{cursor:pointer;}
input{margin:5 0 0 900;}
</style>
<script>
//不用window.onload也可以
document.documentElement.onclick = function() {
document.getElementById('hide').style.display = 'none';
}
//阻止冒泡事件方法
function stopBubble(e) {
e = e || window.event;
if(e.stopPropagation) { //W3C阻止冒泡方法
e.stopPropagation();
} else {
e.cancelBubble = true; //IE阻止冒泡方法
}
}
//方法必須要放在window.onload下
window.onload = function(){
document.getElementById("hide").onclick = function(e) {
stopBubble(e);
}
document.getElementById('btn_show').onclick = function(e) {
document.getElementById('hide').style.display = 'block';
stopBubble(e);
}
}
</script>
</head>
<body>
<div id="hide" class="hander">click here nothing happen,you can click beside this area</div>
<input type="button" id="btn_show" value="show" class="hander"/>
</body>
onclick 如何阻止事件冒泡
<div id="id_tag_list"><span class="right">▼</span><span class="label" onclick="deleteLabel(this)">Python數(shù)據(jù)分析與應(yīng)用</span></div>
//刪除標(biāo)簽的方法
function deleteLabel(target){
var e = target;
if(e && e.stopPropagation){ //阻止冒泡
// 因此它支持W3C的stopPropation()方法
e.stopPropagation();
}else{
// 否則, 我們得使用IE的方法來(lái)取消事件冒泡
window.event.cancelBubble=true;
}
}
jQuery如何阻止事件冒泡
<div class="subcategories">這里有點(diǎn)擊事件</div>
<div class="subcategories">這里有點(diǎn)擊事件</div>
<div class="subcategories">這里有點(diǎn)擊事件</div>
<script type="text/javascript">
//阻止點(diǎn)擊事件
$(function() {
$(".subcategories").click(function(event) {
event.stopPropagation();
});
});
</script>
什么是js事件冒泡?
在一個(gè)對(duì)象上觸發(fā)某類事件(比如單擊onclick事件), 如果此對(duì)象定義了此事件的處理程序, 那么此事件就會(huì)調(diào)用這個(gè)處理程序, 如果沒(méi)有定義此事件處理程序或者事件返回true,
那么這個(gè)事件會(huì)向這個(gè)對(duì)象的父級(jí)對(duì)象傳播, 從里到外, 直至它被處理(父級(jí)對(duì)象所有同類事件都將被激活), 或者它到達(dá)了對(duì)象層次的最頂層, 即document對(duì)象(有些瀏覽器是window)。
如何來(lái)阻止Jquery事件冒泡?
<!DOCTYPE html>
<html">
<head runat="server">
<title>Jquery 事件冒泡</title>
<script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div id="divOne" onclick="alert('我是最外層');">
<div id="divTwo" onclick="alert('我是中間層!')">
<a id="hr_three" href="http://www.xxxxxx.com" mce_href="http://www.xxxxxx.com"onclick="alert('我是最里層!')">點(diǎn)擊我</a>
</div>
</div>
</form>
</body>
</html>
比如上面這個(gè)頁(yè)面,
分為三層:divOne是第外層,divTwo中間層,hr_three是最里層;
他們都有各自的click事件,最里層a標(biāo)簽還有href屬性。
運(yùn)行頁(yè)面,點(diǎn)擊“點(diǎn)擊我”,會(huì)依次彈出:我是最里層---->我是中間層---->我是最外層
---->然后再鏈接到百度.
這就是事件冒泡, 本來(lái)我只點(diǎn)擊ID為hr_three的標(biāo)簽, 但是確執(zhí)行了三個(gè)alert操作。
事件冒泡過(guò)程(以標(biāo)簽ID表示):hr_three----> divTwo----> divOne 。從最里層冒泡到最外層。
如何來(lái)阻止?
1.event.stopPropagation();
<script type="text/javascript">
$(function() {
$("#hr_three").click(function(event) {
event.stopPropagation();
});
});
<script>
再點(diǎn)擊"點(diǎn)擊我", 會(huì)彈出:我是最里層, 然后鏈接到百度
2.return false;
如果頭部加入的是以下代碼
<script type="text/javascript">
$(function() {
$("#hr_three").click(function(event) {
return false;
});
});
<script>
再點(diǎn)擊"點(diǎn)擊我", 會(huì)彈出:我是最里層, 但不會(huì)執(zhí)行鏈接到百度頁(yè)面
由此可以看出:
1.event.stopPropagation();
事件處理過(guò)程中,阻止了事件冒泡,但不會(huì)阻擊默認(rèn)行為(它就執(zhí)行了超鏈接的跳轉(zhuǎn))
2.return false;
事件處理過(guò)程中,阻止了事件冒泡,也阻止了默認(rèn)行為(比如剛才它就沒(méi)有執(zhí)行超鏈接的跳轉(zhuǎn))
還有一種有冒泡有關(guān)的:
3.event.preventDefault();
如果把它放在頭部A標(biāo)簽的click事件中, 點(diǎn)擊"點(diǎn)擊我"。
會(huì)發(fā)現(xiàn)它依次彈出:我是最里層---->我是中間層---->我是最外層, 但最后卻沒(méi)有跳轉(zhuǎn)到百度
它的作用是:事件處理過(guò)程中, 不阻擊事件冒泡, 但阻擊默認(rèn)行為(它只執(zhí)行所有彈框, 卻沒(méi)有執(zhí)行超鏈接跳轉(zhuǎn))
*請(qǐng)認(rèn)真填寫需求信息,我們會(huì)在24小時(shí)內(nèi)與您取得聯(lián)系。