如何把如何把select下拉框的值传到下拉框的值传到id中实现代码中实现代码
完整的代码如下完整的代码如下:
HTML code:
复制代码代码如下:
<!–
EOT;
if($step==1){
print <<<EOT –>
<div class=”main”>
<form name=”form_order” method=”post” action=”?action=$atc” enctype=”multipart/form-data”>
<div class=”shopcartbox”>
<div class=”shopcart2″>
<!–
EOT;
$total_all=0;
$jinbi_all=0;
foreach($listdb AS $name=>$array){
$total=0;
$jinbi=0;
print <<<EOT
–>
<ul class=”u1″>
<li class=”l1″><div><input type=”checkbox” name=”” id=”” checked=”checked” /> 全选</div></li>
<li class=”l2″>商品</li>
<li class=”l3″>返积分</li>
<li class=”l4″>数量</li>
<li class=”l5″>单价</li>
<li class=”l6″>总价</li>
</ul>
<!–
EOT;
foreach($array AS $rs){ $
rs[picurl]=$rs[picurl]?$rs[picurl]:”$webd[www_url]/images/default/nopic.jpg”;
$rs[picurl]=tempdir($rs[picurl]);
@extract($db->get_one(“SELECT content FROM {$_pre}content_$rs[mid] WHERE id=$rs[id]”));
$content=preg_replace(‘/<([^<]*)>/is’,””,$content); //把HTML代码过滤掉
$content=preg_replace(‘/ | | /is’,””,$content); //把多余的空格去除掉 $content= get_word($content,100);
$total+=$rs[price2];
$total_all+=$rs[price2];
$jinbi+=$rs[jinbi2];
$jinbi_all+=$rs[jinbi2];
print <<<EOT
–>
<ul class=”u2″ id=”tr$rs[id]”>
<li class=”l1″><input type=”checkbox” name=”” id=”” checked=”checked” /></li>
<li class=”l2″><a href=”bencandy.php?city_id=$rs[city_id]&fid=$rs[fid]&id=$rs[id]” class=”pic” target=”_blank”><img
src=”$rs[picurl]”height=”90″ onError=”this.src=’$webdb[www_url]/images/default/nopic.jpg'”/></a><h3><a
href=”bencandy.php?city_id=$rs[city_id]&fid=$rs[fid]&id=$rs[id]” target=”_blank”>$rs[title]</a></h3><p>$rs[content]</p></li>
<li class=”l3″>0分</li>
<li class=”l4″>{$rs[num]}</li>
<li class=”l5″><font>{$rs[price]}</font>元</li> <li class=”l6″><font id=”showid$rs[id]” class=”shows$rs[uid]”>{$rs[price2]}
</font>元</li> </ul>
<!–
EOT;
}print <<<EOT
–>
<ul class=”u3″>
<div class=”fr”>
<p class=”p1″>
运送方式:
<!–
EOT;
if($rs[youfei]==”1″){print <<<EOT
–>
<select id=”collect” name=”postdb[youfei]” onchange=”Add(this.value,’total$rs[uid]’)”>