"사용자 정의"텍스트CodeIgniter를 입력
난이이
echo form_input('username', 'Username', 'class="login_input"');
내가 얻을 username을 그 자바 스크립트로 할 수있는 방법 제거한 다음 클릭하셨습니까?
감사
"사용자 정의"텍스트CodeIgniter를 입력
난이이
echo form_input('username', 'Username', 'class="login_input"');
내가 얻을 username을 그 자바 스크립트로 할 수있는 방법 제거한 다음 클릭하셨습니까?
감사
시도 :
echo form_input('username', 'Username', 'class="login_input" onfocus="this.value=\'\'"');
이 방법은 두 onfocus 및 및 위해 onblur 이벤트가
//script tag starts function myFocus(element) { if (element.value == element.defaultValue) { element.value = ''; } } function myBlur(element) { if (element.value == '') { element.value = element.defaultValue; } } //script tag ends echo form_input('username', 'Username', 'class="login_input" onfocus="myFocus(this);" onblur="myBlur(this);" ');
이이
echo form_input('username', 'Username', 'class="login_input" onblur="if (this.value == \'\') {this.value = \'Custom\';}" onfocus="if (this.value == \'Custom\') {this.value = \'\';}" value="Custom"');
문제가 있다는에게 그가 입력하면 시도 작동합니다 무언가를 클릭 한 다음 그것을 클릭하십시오. – kim