js cannot pass value to the background problem

Added the following code to JS: `exportExcel = function (obj) {

		//这里是每个JavaBean对应的控制层方法
		window.location.href = "/export?ID="+obj;

}`

As a result, obj could not be passed into the parameters in the background. Later, after trying a variety of methods, I found that the ID parameter was not written in. The parameters at that time were HttpServletRequest request, HttpServletResponse response. I thought that request could request js parameters. Later I learned that only form parameters could be requested. js parameters could not be obtained. You must add js parameters to the parameters of the implementation method. Obtain.
Above, record the mistakes you made.

Guess you like

Origin blog.csdn.net/qq_45098495/article/details/116666600