我有这个代码->
var searchexampletxt = '<?php echo JText::_('SEARCH_EXAMPLE'); ?>';
Window.onDomReady(function(){
$('BLA_BLA').addEvent('focus',function(){
if(this.value=='<?php echo JText::_('SEARCH_EXAMPLE');?>')
{
this.value="";
}
});
$('BLA_BLA').addEvent('blur',function(){
if(this.value=='')
{
this.value="<?php echo JText::_('SEARCH_EXAMPLE');?>";
}
});
});
有人可以帮我吗,我怎样才能使“SEARCH_EXAMPLE”文本(默认显示在输入框中)例如颜色#CCCCCC,但我在输入框中写的文本例如是#333333?
谢谢干杯