选择更改时的JavaScript交互 [英] JavaScript Interactions on Selection Change

查看:43
本文介绍了选择更改时的JavaScript交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我设置了一个我想使用的表.我不确定从这里去哪里.

So i set up a table that i would like to use. I''m not sure where to go from here.

<table width="951" border="0">
  <tr>
    <th width="145" scope="col">Part Description</th>
    <th width="155" scope="col">Quantity</th>
    <th width="155" scope="col">New/Old</th>
    <th width="153" scope="col">Quoted Price</th>
    <th width="160" scope="col">Aker Price</th>
    <th width="143" scope="col">Part #</th>
  </tr>
  <tr>
    <td><form id="form1" name="form1" method="post" action="">
      <label>
        <div align="center">
          <select name="Part Description" id="Part Description">
            <option>ACL 5500</option>
            <option>ACL 5100</option>
            <option>Profire 1100</option>
            <option>FGI 351</option>
          </select>
        </div>
      </label>
    </form></td>
    <td><form id="form2" name="form2" method="post" action="">
      <label>
        <div align="center">
          <select name="Quantity" id="Quantity">
            <option>0</option>
            <option>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
          </select>
        </div>
      </label>
    </form></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

</table>



当我从产品菜单中选择时,我希望在不同的列之一中弹出一个存储列表.

例如,如果我选择了ACL 5500,我希望价格自动在报价栏弹出,并根据我选择的数量乘以该数字.

有什么我应该寻找的东西,自从我用javascript完成任何操作以来已经有好几年了,我现在完全迷失了.

我也使用Dreamweaver CS4来做到这一点.



when i select from the product menu i would like a stored list to popup in one of the different columns.

for example, if i selected ACL 5500, i would like for a price to automatically pop up in the quoted price column and multiply that number according to the quantity i select.

is there something i should be looking for, it''s been years since ive done anything with javascript and i am completly lost right now.

i am using dreamweaver cs4 to do this as well.

推荐答案

JavaScript中的大多数元素(表,表单元格,下拉列表)都具有事件,例如单击事件或选择事件已更改. Google了解如何使用这些JavaScript事件并从那里开始.
Most elements (tables, table cells, drop downs) in JavaScript have events, such as click events or selection changed events. Google for how to use those JavaScript events and go from there.


请以我们自己的方式阅读此文章.... ^ ]
Read this article form our own .... Using JavaScript to handle drop-down list selections[^]


这篇关于选择更改时的JavaScript交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆