I have a code that will show the value of form1 to another page.
Now, This +(plus sign) keeps on showing and substituting the spaces.
Is there anyone can help me here?
Thank you so much.
Below are my codes:
Page1.html
<form type=get action="page2.html">
  <table>
    <tr>
      <td>First Name:</td>
      <td><input type=text name=firstname size=10></td>
    </tr>
    <tr>
      <td>Last
        Name:
      </td>
      <td><input type=text name=lastname size=10></td>
    </tr>
    <tr>
      <td>Age:</td>
      <td><input type=text name=age size=10
        id="age"></td>
    </tr>
    <tr>
      <td colspan=2><input type=submit
        value="Submit"> </td>
    </tr>
  </table>
</form>
Page2.html
<script LANGUAGE="JavaScript"> 
  function getParams() {
    var idx = document.URL.indexOf('?');
    var params = new Array();
    if (idx != -1) {
      var pairs = document.URL.substring(idx + 1,
        document.URL.length).split('&');
      for (var i = 0; i < pairs.length; i++) {
        nameVal = pairs[i].split('=');
        params[nameVal[0]] = nameVal[1];
      }
    }
    return params;
  }
  params = getParams();
  firstname =
     unescape(params["firstname"]);
  lastname =
     unescape(params["lastname"]);
  age = unescape(params["age"]);
  ages = age;
  document.write("firstname = " + firstname + "<br>");
  document.write("lastname = " + lastname + "<br>");
  document.write("<input type=text name=age size=10 value=" + ages +
    ">");
</script>
 
     
    