php form表单里的判断
{{foreach from=$selectAry item=select}}
{{if $select.id == sid}}
{{$select.name}}
{{/if}}
{{/foreach}}
我这里循环输出了但是我让想他输出一个是对应我这个表单里的id的我怎么样做判断,我现在这样的判断一个都输不出来了
如果把判断去了就输出两个
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> function sendData(){ var uid=document.getElementById('hidden_uid').value; var sid = document.getElementById('hidden_sid').value; var text = document.getElementById('part_text').value; var rideo = document.getElementsByName('part[is_good]'); var is_good; if(text == '' || text == '输入您的看法,字数在50字内'){ alert('请提出您的看法,不然投票无效哦!'); return false; } alert (sid); for(var i=0; i<rideo.length if true is_good="rideo[i].value;" var url="http://www.h-elab.com/ajax/part/recode.php" return></rideo.length>