|
楼主 |
发表于 2011-6-1 15:23:11
|
显示全部楼层
zhouli520 发表于 2011-6-1 15:11
你的表单的name属性是searchform麽?
代码是这样的:
<?php
$attribute = array('name'=>'searchform', 'method'=>'get');
echo form_open("microblog/search", $attribute);
if(isset($n)&&$n){}
else $n='';
$ndata=array("name"=>"query", "size"=>"45", "class"=>"input", "value"=>$n);
echo "<br>";
echo form_input($ndata);
?>
<?php
$submit_att=array('type'=>'submit', 'value'=>'search', 'class'=>'submit', 'id'=>'sub');
echo form_submit($submit_att);
$realtime_att=array('type'=>'button', 'content'=>'realtime', 'class'=>'realtime');
echo form_button($realtime_att);
?><br>
?> |
|