<?php
$this->widget('CAutoComplete', array(
'name'=>'search',
'id'=>'input-box',
'attribute'=>'search',
'url'=> $this->createAbsoluteUrl('products/suggestions'),
'value'=>($_GET['search'] == '')?'Search for Mobiles, Cameras & Laptops':$_GET['search'],
'minChars'=>2,
'scroll'=>false,
'resultsClass'=>'searchAutoComplete ac_results',
'htmlOptions'=> array(
'class'=>'searchClickClear',
),
'methodChain'=>'.result(function(){$("form#search-form").submit();})'
));
?>
这是我用于输入的小部件,我正在通过类searchAutoComplete
。课程应该是什么?我想要的是,当我单击该字段时,该值将为空。