[英]Change color of one input word in php form
Below is a drop down search form, I am looking to change the color of one word in the this.value sentence that is displayed. 下面是一个下拉搜索表单,我希望更改显示的this.value语句中一个单词的颜色。
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<input type="text" onfocus="if(this.value=='We'll steer you in the right direction') this.value='';" onblur="if(this.value=='') this.value='We'll steer you in the right direction';" value="We'll steer you in the right direction" name="s" id="s" /><br />
Im looking to have the word "steer" displayed in a different color. 我希望以不同的颜色显示“转向”这个词。
Thanks in advance. 提前致谢。
You will need to create your own control to do that. 您需要创建自己的控件才能执行此操作。 A "rich text" box would allow you to control the formatting inside your text box, see this question . “富文本”框允许您控制文本框内的格式,请参阅此问题 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.