开发者

How to send parameter to action method from java script

开发者 https://www.devze.com 2023-04-07 12:40 出处:网络
In controller (imagesController) I have \'crop\' action get and post. I am trying to send st开发者_JAVA百科ring in it but not working. I am using replace to load view in iFrame but how to post some pa

In controller (imagesController) I have 'crop' action get and post. I am trying to send st开发者_JAVA百科ring in it but not working. I am using replace to load view in iFrame but how to post some parameter to it?

myIframe.location.replace('images/crop');


myIframe.location.replace('images/crop?someParam=someValue');

As far as POST is concerned, forget about it using the location property, tat works only with GET requests. If you want to perform a POST request you need either a form submission or an AJAX request.

0

精彩评论

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