Jquery - Pass asp button command argument with jquery

前端 未结 5 1697
野的像风
野的像风 2020-12-18 07:11

I have asp button:


         


        
5条回答
  •  余生分开走
    2020-12-18 07:48

    I find using __doPostBack('id','args') creates a full page postback when on a submit button. I find it easier is add a hiddenfield the page, set the value, then call the button.click() event

        
        
    
    
        $('#CommandArg').val('my argument');
        $('#btnTrigger').click();
    

提交回复
热议问题