Writing /volume1/Web/Public/dokuwiki/data/log/deprecated/2024-11-15.log failed
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
study:javascript:event [2008/01/30 12:39] – created banana | study:javascript:event [2008/03/20 01:51] (現在) – banana | ||
---|---|---|---|
行 2: | 行 2: | ||
document.compatMode | document.compatMode | ||
- | - Quirks mode(" | + | - Quirks mode[BACKCompat] |
- | - Strict mode("CSS1Compat" | + | - Strict mode[CSS1Compat] : Standard-compliant mode is switched on. |
- | < | + | < |
function getPosition(e) { | function getPosition(e) { | ||
e = e || window.event; | e = e || window.event; | ||
行 26: | 行 26: | ||
</ | </ | ||
+ | |||
+ | {{keywords> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Test Sample ===== | ||
+ | < | ||
+ | < | ||
+ | <script type=" | ||
+ | function open_win() | ||
+ | { | ||
+ | window.open(" | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <a href="#" | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== Change background color of a selected row ====== | ||
+ | <code javascript> | ||
+ | function TT_click(oR) { | ||
+ | var oT = oR.parentNode.parentNode; | ||
+ | | ||
+ | oR.style.backgroundColor = ''; | ||
+ | oT.targetRec = false; | ||
+ | } else { | ||
+ | if(oT.targetRec)oT.targetRec.style.backgroundColor = ''; | ||
+ | oR.style.backgroundColor = oT.currentBackgroundColor; | ||
+ | oT.targetRec = oR; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function TT(Tid, | ||
+ | var oT = document.getElementById(Tid); | ||
+ | if(! oT)return; | ||
+ | |||
+ | | ||
+ | oT.rows[i].onclick=function(){TT_click(this); | ||
+ | } | ||
+ | oT.targetRec=false; | ||
+ | oT.currentBackgroundColor=SetColor; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Code sample ===== | ||
+ | <code html> | ||
+ | <BODY bgcolor="# | ||
+ | <form name=" | ||
+ | |||
+ | <テーブルをクリックすると行の色が変わるサンプル> | ||
+ | |||
+ | <TABLE id=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | |||
+ | <script type=" | ||
+ | <!-- | ||
+ | TT(' | ||
+ | //--> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ |