开发者

Placeholder - Not support in operamobile - Jquerymobile

开发者 https://www.devze.com 2023-02-05 11:13 出处:网络
The text box place holder does not support in the OperaMobile10.0. But Its working fine with safari. How t开发者_如何学Co solve this one?

The text box place holder does not support in the OperaMobile10.0. But Its working fine with safari. How t开发者_如何学Co solve this one?

Please help me.

THanks in advance.


That's a problem with the browser. The attribute placeholderis a HTML5 attribute, which is also not supported by Internet Explorer 9 in the latest version.


$(document).ready(function(){ 
  $('input[type=text]').focus(function(){ 
    if($(this).val() == $(this).attr('defaultValue'))
    {
      $(this).val('');
    }
  });

  $('input[type=text]').blur(function(){
    if($(this).val() == '')
    {
      $(this).val($(this).attr('defaultValue'));
    } 
  });
}); 

http://pinoytech.org/question/4595584/how-can-i-improve-this-basic-jquery-code

0

精彩评论

暂无评论...
验证码 换一张
取 消