作者TonyQ (骨頭)
看板Web_Design
標題Re: [問題] CSS中的JavaScript
時間Tue Mar 20 23:43:01 2007
※ 引述《StarTouching (撫星)》之銘言:
: 大家都知道JavaScript可以控制CSS(obj.style),
: 可是我有個問題, CSS能不能控制JavaScript的事件處理器?
: 例如所有<button>標籤都要有 onClick="myFunc(this);"
: 有沒有辦法用css做到? 就像用css設定一般的標籤屬性一樣?
: ---
: 我的幻想:
: button{
: event:onclick('myFunc(this)');
: }
: 或者
: button{
: event.onclick:myFunc(this);
: event.ondbclick:none;
: }
查了一下,好像還真的有。
叫event-selectors
http://encytemedia.com/event-selectors/
--
I am a person, and I am always thinking .
Thinking in love , Thinking in life ,
Thinking in why , Thinking in worth.
I can't believe any of what ,
I am just thinking then thinking ,
but worst of all , most of mine is thinking not actioning...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.134.27.68
→ TonyQ:參考看看吧 :P 03/20 23:43
→ TonyQ:這是透過JS做plug-in的效果 :P 03/21 00:08