下拉菜单啊写TEXT。。 这个应该去JavaScript里去问在size的onChange事件里把Price的值变一下就行了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1 <select name="size" onchange="document.all.price.value=this.value"><? $sql = "SELECT * FROM Tphotoprice where shop_id='$shopid' order by size "; $result = mysql_query($sql) or die(mysql_error()); $num = mysql_num_rows($result); if($num > 0) { while($row = mysql_fetch_array($result)) { ?> <option value="<? echo $row['size'];?>"><? echo $row['size'];?></option><?}?> </select> 2 <input name="price" type="text" id="price" value="" readonly> 加上,有很多产品,size 和price是对应每一个商品就是:产品1 size price; 产品2s ize price;我不知道是不是有关系。 <select name="size" onchange="price.value=this.options[this.selectedIndex].price"><? $sql = "SELECT * FROM Tphotoprice where shop_id='$shopid' order by size ";$result = mysql_query($sql) or die(mysql_error());$num = mysql_num_rows($result);if($num > 0) { while($row = mysql_fetch_array($result)) {?><option value="<? echo $row['size'];?>" price="<?echo $row['price'];?>"><? echo $row['size'];?></option><?}?></select><input name="price" type="text" id='price' readOnly> 一个PHP递归程序请教大家下。。 需求网站制作 【求助】能用php下载别的网站的流媒体文件吗【急】 php连接wcf时报错 我临摹的代码!! 同时自己写的很累.想找几个朋友一起写!! phpMyAdmin连接mysql4.12的问题? 求用copy()函数上传文件的代码 大家谈谈MySql的多级表 新手求助 新手请教云服务器搭建 怎样得到两个datetime类型的变量之间相差的天数? 怎么取得用户离开是的时间啊?
<?
$sql = "SELECT * FROM Tphotoprice where shop_id='$shopid' order by size ";
$result = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($result);
if($num > 0) {
while($row = mysql_fetch_array($result)) {
?>
<option value="<? echo $row['size'];?>"><? echo $row['size'];?></option><?}?>
</select>
2 <input name="price" type="text" id="price" value="" readonly>
就是:产品1 size price;
产品2s ize price;
我不知道是不是有关系。
<?
$sql = "SELECT * FROM Tphotoprice where shop_id='$shopid' order by size ";
$result = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($result);
if($num > 0) {
while($row = mysql_fetch_array($result)) {
?>
<option value="<? echo $row['size'];?>" price="<?echo $row['price'];?>">
<? echo $row['size'];?>
</option>
<?}?>
</select>
<input name="price" type="text" id='price' readOnly>