課程
/前端開發
/JavaScript
/JavaScript進階篇
我給一個H3標簽添加了onclick 結果點擊后沒有任何效果;
2015-03-24
源自:JavaScript進階篇 6-2
正在回答
你把a打印出來看看
一個函數
function qiandao(){
var a=getElementById("qiandao");
a.className="daole";
}
支持的 HTML 標簽:
<a>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, <body>, <button>, <caption>, <cite>, <code>, <dd>, <dfn>, <div>, <dl>, <dt>, <em>, <fieldset>, <form>, <h1> to <h6>, <hr>, <i>, <img>, <input>, <kbd>, <label>, <legend>, <li>, <map>, <object>, <ol>, <p>, <pre>, <samp>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>, <thead>, <tr>, <tt>, <ul>, <var>
支持的 JavaScript 對象:
button, document, checkbox, link, radio, reset, submit
GNEZ 提問者
添加了什么響應事件?
舉報
本課程從如何插入JS代碼開始,帶您進入網頁動態交互世界
3 回答為什么 onclick() onmouseout()不能加在a標簽里?
2 回答clearInterval可以在onclick里面直接用,為什么clearsetTimeout卻要在js里面創建個函數然后再用到onclick里面?
1 回答onclick的使用范圍
1 回答直接在onclick調用setinterval為什么不能重新開始計時呢?
2 回答在js中使用onclick的時候一定要用function(){}嗎?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2015-03-24
你把a打印出來看看
2015-03-24
一個函數
function qiandao(){
var a=getElementById("qiandao");
a.className="daole";
}
2015-03-24
支持的 HTML 標簽:
<a>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, <body>, <button>,
<caption>, <cite>, <code>, <dd>, <dfn>, <div>, <dl>, <dt>, <em>, <fieldset>,
<form>, <h1> to <h6>, <hr>, <i>, <img>, <input>, <kbd>, <label>, <legend>,
<li>, <map>, <object>, <ol>, <p>, <pre>, <samp>, <select>, <small>, <span>,
<strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>,
<thead>, <tr>, <tt>, <ul>, <var>
支持的 JavaScript 對象:
button, document, checkbox, link, radio, reset, submit
2015-03-24
添加了什么響應事件?