AJAX call on OnChange event in MVC

前端 未结 5 936
温柔的废话
温柔的废话 2021-01-02 19:39

I have to make an AJAX call on the onchange event of a dropdownlist which is part of a view. On the change event i need to call the database, do some calculations display th

5条回答
  •  礼貌的吻别
    2021-01-02 20:04

    Yes, that’s right – only change is replacing:

    onchange = “this.form.submit();”
    

    with:

    onchange = “$(this.form).submit();”
    

    found it in this post

提交回复
热议问题