Develop weird problems

The empty method of JQuery is mainly carried out through the attribute of innerHTML , which has compatibility problems under IE8 .

Each time the linked select is empty , the width will be shortened . This time, use native javascript:

 

var optionObj = new Option("all", "all"); 

           jsObj.options.add(optionObj);

                for(var i = 0;i< content.length;i++){

                optionObj = new Option(content[i].Org_Name, content[i].Org_Name); 

              jsObj.options.add(optionObj);

 

                }

 

For the return value of springMVC , the default is json , but under IE8 , there will be a download prompt, the solution :

 

The method's url mapping declaration is explicitly modified to the following code:

 

@RequestMapping(value = "paramSave",produces = "text/plain;charset=UTF-8")

At the same time, the return value of the method is String, which cannot be modelandView.

Also, it doesn't seem to be able to return an int either, so I'm not sure. . . . .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326383228&siteId=291194637