call a page passing parameters in the url

1

I have a simple HTML file that is accessed by:

https:111.111.111:8080/index.html/?login="me"&password="1234"

The problem is that trying to access it gives nonexistent page. I put a page teste.html there, with pure HTML and I went with https:111.111.111:8080/teste.html and it accessed normal, I believe it could be some problem with the parameters. Can anyone help me?

Here is the code for my page:

<html>
<head>
    <title>Teste</title>
    <meta charset="UTF-8">
</head>
<body onload="myFunction()">

    <div id="log"></div>
    <div id="pass"></div>

    <script src="https://code.jquery.com/jquery-1.10.2.js"></script><scripttype='text/javascript'>functionmyFunction(){varparameters=location.search.substring(1).split("&");

            var temp = parameters[0].split("=");
            l = unescape(temp[1]);
            temp = parameters[1].split("=");
            p = unescape(temp[1]);
            document.getElementById("log").innerHTML = l;
            document.getElementById("pass").innerHTML = p;
        }

    </script>

</body>

    
asked by anonymous 19.06.2018 / 16:30

1 answer

1

The problem is in the quotation marks of the url:

https:111.111.111:8080/index.html?login=me&password=1234

I think it works.

    
19.06.2018 / 18:11