怎样在js里取得本页面form里面控件的值

amu0528 2005-08-13 10:53:14
如题!!!
...全文
331 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lilinking 2005-08-13
  • 打赏
  • 举报
回复
顺便问问
你们是怎样使自己的三角变成两个的
lilinking 2005-08-13
  • 打赏
  • 举报
回复
建议用button应为用submit时可能会出现这样的问题,
即使做了判断,alert确认后也要继续提交,也就是说return没发生作用。
用button的话在js中用document.表单名.submit.submit();方法提交。
amu0528 2005-08-13
  • 打赏
  • 举报
回复
<netui:form action="enterProductOrder" style="background-color:#ffffff;">
<table width="600" class="wiztable">
<tr>
<td class="wizhead" colspan=4>
<b>Order Entry Wizard:</b>
</td>
</tr>
<tr>
<td class="wizbody" colspan=4>Please enter in the quantity of each product you would like to order:
</td>
</tr>
<data:repeater dataSource="{actionForm.productOrders}" >
<data:repeaterHeader>
<tr class="wizbody">
<td class="wizbody">
<b>Product ID</b>
</td>
<td class="wizbody">
<b>Description</b>
</td>
<td class="wizbody">
<b>List Price</b>
</td>
<td class="wizbody">
<b>Quantity</b>
</td>
</tr>
</data:repeaterHeader>
<data:repeaterItem>
<tr class="wizbody">
<td class="wizbody">
<netui:label value="{container.item.product.productID}"></netui:label>
<hr>
</td>
<td class="wizbody">
<netui:label value="{container.item.product.description}"></netui:label>
<hr>
</td>
<td class="wizbody">

<netui:label value="{container.item.product.listPrice}"></netui:label>
<hr>
</td>
<td class="wizbody">
<netui:textBox dataSource="{container.item.quantityOrdered}" defaultValue="0" size="5"></netui:textBox>
<hr>
</td>
</tr>
</data:repeaterItem>
</data:repeater>

<tr>
<td class="wizbodyright" colspan=4>
<hr>
<netui:textBox dataSource="{request.price}" defaultValue="fgfghgf" tagId="23"/>

<netui:select dataSource="{actionForm.productOrders}"></netui:select>


  
<netui:button value="提交定单" />
<br></td>
</tr>

</table>
</netui:form>
这是form中的内容 我要得到 textBox 中的内容 怎么取得 用javascript 取
哪位高手帮我写一下
dmy22271 2005-08-13
  • 打赏
  • 举报
回复
<input type="submit" value="dfdf" onClick="cc()">在写一个,用两个不就行了吗
amu0528 2005-08-13
  • 打赏
  • 举报
回复
如果有两个BUTTON 那怎么选中要的那个啊
wst302 2005-08-13
  • 打赏
  • 举报
回复
document.form.控件.value

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧