Under the TP framework, how does the controller obtain the value on the page?
LRTRL2017-05-24 16:54:50
0
3
1698
I passed a value (such as id) to the view page from other places. Now I want to get the id value on the view page from the controller method corresponding to the view page. How can I get it? ?
replyThank you, I have found the error, because I did the web page authorization before, and something went wrong when jumping, which caused the ajax submission later not to the correct address, so I couldn't solve it.
replyI have written this hidden field on the view page. Now I want to pass the value to the controller method for judgment when loading this page. I use ajax to pass the value, but the load event will not work. , using the submit event will not work either
Do you mean that AJAX cannot be submitted? In this case, the js may be written incorrectly. You can post the code for everyone to refer to.
If you are getting the value from the corresponding controller in the view, then you should get it via get
Add a form hidden field to pass the value.