登録フォームでjQueryMaskedInput Plugin(http://digitalbush.com/projects/masked-input-plugin/)を使用したい。私のフォームはそのように見えます
..。
<input class="part1" type="text" name="lname" value="Last Name" onfocus="if(this.value=='Last name') {this.style.color='#aea592';this.style.fontStyle='normal'; this.value=''};" onblur="if(this.value=='') {this.style.color='#aea592'; this.style.fontStyle='italic'; this.value='Last name'}" />
<input class="part2" type="text" id="dob" name="dob" value="Date of Birth" onfocus="if(this.value=='Date of Birth') {this.style.color='#aea592';this.style.fontStyle='normal'; this.value=''};" onblur="if(this.value=='') {this.style.color='#aea592'; this.style.fontStyle='italic'; this.value='Date of Birth'}" />
..。
ファイルの終わり
<script src="core/code/js/mask.js"></script>
<script type="text/javascript">
jQuery(function($) {
$('#dob').mask('99.99.9999', {placeholder:' '});
});
</script>
ページを開くと、[名前]フィールドに「名前」という単語が表示されますが、生年月日には何も表示されません。http://prntscr.com/2miaa onfocusイベントに対してのみマスクプラグインをアクティブ化するにはどうすればよいですか?