0

How do I create a postback with a onchange while getting the value into a Request[]

The code:

<select name="nameOnSelection" id="idOnSelection" onchange="">
    <option value="1">
        random string
    </option>
    <option value="2">
        random string
    </option>
</select>

Im coding in cshtml. and im not looking for JSON solution.

4

1 回答 1

0

使用 jQuery,您可以轻松找到最近的<form>标签并提交它。

<select onchange="$(this).closest('form').submit();"/>
于 2013-04-08T07:46:11.627 回答