html提交参数到html

    xiaoxiao2021-12-14  64

    aa.html 提交参数到 view.html aa.html代码如下: <html> <head> <title></title> </head> <body> <form id="aa" action="./view.html" method="get"> <input type="text" id="result" name="result" value="12"/> <input type="submit" id="submit" value="submit"/> </form> </body> </html> view.html代码如下: <html> <head> <title></title> </head> <script type="text/javascript"> function GetParam(){ var path=window.location.href; var pos=path.indexOf("="); var parm; if(pos > 0){        parm=path.substring(pos+1,path.length); } document.getElementById('result').value=parm; return parm; } </script> <body οnlοad="GetParam()"> <input type="text" id="result" name="result" /> </body> </html> test.rar (569 Bytes)下载次数: 3
    转载请注明原文地址: https://ju.6miu.com/read-965057.html

    最新回复(0)