JS根据表单中的选项,自动生成span标签后显示选中的内容

在下订单时,根据选择的订单内容,动态显示出来,供用户确认。

源代码如下:

<table   border ="1" cellspacing ="1">
    <tr style =" background-color :#FFDFFF">
         <th rowspan="2">景点编号</th>
        <th  rowspan ="2" >门票名称</th>
        
        <th colspan="2">成人票</th>
        
        <th colspan="2">学生票</th>
        
        <th colspan="2">儿童票</th>
         
        <th colspan ="2">军人票</th>
        
    </tr>

    
    <tr style =" background-color :#FFDFFF">
   <td>价格</td><td>张数</td><td>价格</td><td>张数</td><td>价格</td><td>张数</td><td>价格</td><td>张数</td>
   </tr>
   
<!--获取表中信息-->
                     
   <%   
       <!--根据前面界面传过来的bid查询出该bid下的所有信息,并显示在表中-->
       int bid=Convert.ToInt32(Request.QueryString["bid"]);
       DataTable dt = TBScenic_item.GetTBScenicInfoByBid(13);
         for (int i = 0; i < dt.Rows.Count; i++)
                     { %> 

        <tr>
        <td><span id="sid<%=i %>"><%Response.Write(dt.Rows[i]["sid"].ToString()); %></span></td>
        <td>
        
    <!--复选框--> 
         <input id="Checkbox<%=i %>" type="checkbox" οnclick="calculation()" /><%--cbxClick(this.id,<%=i%>)--%>
        <span class="spantable" id="sname<%=i %>"><%Response.Write(dt.Rows[i]["sname"].ToString()); %></span>    
        </td>  
        <td id="price_putong"><span id="spanpt_price<%=i %>"><%Response.Write(dt.Rows[i]["price_putong"].ToString()); %></span>    
            </td>
        <td><select id="putong<%=i %>" name="D1" οnchange="calculation()" 
                disabled="disabled">
                <option value="0">0</option>
                <option 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值