EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: wymak on January 16, 2017, 08:56:22 AM



Title: color single word in textbox
Post by: wymak on January 16, 2017, 08:56:22 AM
I want to have a textbox showing 'the sky is blue', but the following code working, please enlighten me:


 <input  id='ititle' name='title' class='easyui-textbox'  style="width:100%;">

     <script type="text/javascript"> 
       
     $(function(){ 
      $('#ititle').textbox('setValue',"the sky is <font color='blue'>blue</font>");
     });  // end $function()
      
</script>


Title: Re: color single word in textbox
Post by: stworthy on January 16, 2017, 05:32:46 PM
No, an <input> element does not allow to display html code with multiple styles.