【发布时间】:2017-07-13 23:55:42
【问题描述】:
我有一个以选择开头的表单。根据第一个选择(选择哪个报告)的选择,我需要更改表单提交到的 .cfm 的操作路径。有人可以帮助我如何做到这一点吗?无论是 HTML、ColdFusion 还是 jQuery (Javascript),我都愿意接受任何适当的方式。
所以从选择开始:
<select class="form-control" id="reporttype" name="reporttype">
<option value="" selected="selected">Select Report</option>
<option id ="checklistreports" value="checklistreports" >Checklist Stats</option>
<option id ="locationreports" value="locationreports" >Location Stats</option>
</select>
如果选择#checklistreports,则表单应为<form name="generatereport" method="post" action="_checklists_queries.cfm">
但如果选择#locationreports,则格式应为<form name="generatereport" method="post" action="_location_queries.cfm">
对此的任何帮助将不胜感激。
我试图在 CF 的 IF 语句中做,但不幸的是我卡住了,没有结果。
【问题讨论】:
标签: javascript jquery html forms coldfusion