Tag:transmit

  • Understand the parameter transfer in JS function through an example

    Time:2019-10-31

    First look at a JS written test: var setObj=function(o){ o.name=”xiaoming”; o={}; o.name=”xiaohong”; } var p={name:”xixi”,age:24}; setObj(p); console.log(p); The answer is {Name: Xiaoming, age24}; In JavaScript, the function parameter defaults to the reference type. 1. Function transfer value type: The code example is as follows: function addNum(num){  num+=10;  return num; } var num=10; var result=addNum(num); console.log(num); […]

  • Four methods of transferring parameters in JSP

    Time:2019-10-8

    Today, the teacher talked about four methods of transferring parameters in jsp. I think it’s a good summary for later use. Form form 2. request. setAttribute (); and request. getAttribute (); 3. Hyperlinks: <a herf=”index.jsp”? A=a&b=b&c=c>name</a> 4、<jsp:param> Following are examples: Form form form.jsp: <%@page contentType=”text/html; charset=GB2312″%> <html> <head> <title> form.jsp file </title> </head> <body style=”background-color:lightblue”> […]

  • Method of Ajax transferring object array from JSP to background

    Time:2019-6-17

    Today’s work has met the need to transfer object array from JSP to the background. After searching a lot of information on the Internet, it has finally been solved. Due to the incomplete information on the internet, the detailed solution process is recorded. As follows: JSP: function addAccount(){ debugger; var html = ”; var ary […]

  • Quickly solve the problem of Ajax being passed empty but displayed undefined on the page

    Time:2019-6-2

    Yesterday, I encountered a problem in coding, which I had encountered before, but I didn’t take any notes when I thought it was simple. As a result, I still had to go to Baidu yesterday and look for Baidu again for a while, so I will record it. Avoid forgetting later. The first problem is […]