How to send parameter to action method from java script
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.
精彩评论