<select name="jlk">//html页面里的代码 <volist name="jlk" id="jk"> <option value={$jk.jlname}>{$jk.jlkname}</option> </volist> </select>//tp框架上controller上的代码public function handle(){ if(!IS_AJAX) E('页面不存在'); $data=array( cardcode => I('CardCode'), cardname => I('CardName'), ownerkey => session('area'), cntctprsn => I('cntctprsn'), jlk => I('jlk'), curtotal => I('price'), contract => I('contract'), notes => I('notes'), md_print => 0, datatime => time(), u_id => session('u_id'), ptint_no => 0, receiptno => I('receiptno'), sapd => 2, );}//js的页面上的代码var CardCode=$('input[name=CardCode]'); var CardName=$('input[name=CardName]'); var ownerkey=$('input[name=ownerkey]'); var cntctprsn=$('input[name=cntctprsn]'); var jlk=$('select[name=jlk]'); var notes=$('input[name=notes]'); var Contract=$('select[name=Contract]'); var receiptno=$('input[name=receiptno]') if(curtotal.val()=='') { alert('收款金额不能为空'); curtotal.focus(); return; } if(receiptno.val()=='') { alert('收据号不能为空'); curtotal.focus(); return; } if(confirm("你的收款额是¥: "+curtotal.val()+"元.")) { //ajax提交数据 $.post(handleUrl,{CardCode:CardCode.val(),CardName:CardName.val(), ownerkey:ownerkey.val(),cntctprsn:cntctprsn.val(),jlk:jlk.val(), curtotal:curtotal.val(),notes:notes.val(),Contract:Contract.val(), receiptno:receiptno.val()},我想请问下怎么样把下拉框的值传输到TP的jlk上面去用变量真心不会 求解
目前暂无任何回答
- 0 回答
- 0 关注
- 1417 浏览
添加回答
举报
0/150
提交
取消