※未適用 |
jsとcssを外部ファイルとして読み込む
<link rel="stylesheet" type="text/css" href="css/passwordTextExtension.css" media="screen" />
<script type="text/javascript" src="js/passwordTextExtension.js"></script>
本JSを適用したいinput要素のクラス属性に"pwdExt"を指定する。
・対象となるinput要素は type="password" のみ<input type="password" name="password1" id="password1" class="pwdExt" />
jsファイル内の13~20行目付近にある設定値を編集することで、デザインや動作をある程度サイトに合わせることができる。
//-----------------------------------------
// 設定値
//-----------------------------------------
conf : {
targetClass : 'pwdExt', // 対象とするクラス
speed : 70, // 文字を隠す速さ
tooltipColor : 'black' // tooltipの色 --> 'black','white','red','green'
},