$searchKeys = array("言情","玄幻","都市","全本","校园","耽美","武侠","斗破苍穹");
$searchKeyLength = count($searchKeys);
$keyIndex = rand(0,$searchKeyLength-1);
<input emptyok="true" name="qs" value="<?php echo $searchKeys[$keyIndex];?>" size="10" />
结果文件框里面怎么也不显示动态取的值;
解决的办法:
$tmp = rand();
<input emptyok="true"
name="qs<?php echo $tmp;?>" value="<?php echo $searchKeys[$keyIndex];?>" size="10" />
postfield的值设定的时候:<postfield name="key" value="$(qs<?php echo $tmp;?>)" />