0

下面是一个下拉搜索表单,我希望更改显示的 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 />

我希望以不同的颜色显示“转向”一词。

提前致谢。

4

1 回答 1

2

您将需要创建自己的控件来执行此操作。“富文本”框将允许您控制文本框内的格式,请参阅此问题

于 2012-11-13T16:24:59.783 回答