开发者

Accessing form's elements in controller without submit

开发者 https://www.devze.com 2023-02-11 11:14 出处:网络
Is there any way I can access the form elements in view like textbox or select开发者_StackOverflow社区box(combobox) from controller without submitting form in view?That is impossible. The only way dat

Is there any way I can access the form elements in view like textbox or select开发者_StackOverflow社区box(combobox) from controller without submitting form in view?


That is impossible. The only way data gets to the server is if its submitted, be it via normal means or ajax, post or get.

I think you are looking for a way to submit the form without reloading the page, which would be ajax. You can use something like jQuery that has a nice framework to do this easily. you can use the .post()/.get() and .serialize() methods

http://api.jquery.com/serialize/

http://api.jquery.com/jQuery.post/

http://api.jquery.com/jQuery.get/

0

精彩评论

暂无评论...
验证码 换一张
取 消