我已经构建了一个Javascipt代码,该代码是访问者必须接受的弹出策略。
这工作正常,但现在我将使用一些systemAccounts,他们将不会自己接受。

现在,我希望可以找到自定义URL字符串的解决方案。我想创建一个“ https://www.url.de/xyz/?pressButtonAutomaticaly?goToNextPage”字符串

希望您能给我一个提示,我发现的只是关于“ createButton”的信息

这是代码:


   

  <script type="text/javascript">

        function getConfirmation(){

           var retVal = confirm("Do you want to continue by accepting  Policy ?");
           if( retVal == true ){
              document.write ("User wants to continue!");
                   // window.location = "URL";
                    window.location = "URL";
              return true;
           }
           else{
              document.write ("You have Not Accepted Download Policy!");
                    window.close();

              return false;


           }
        }

  </script>




谢谢你,并祝你好运,
尼尔斯

最佳答案

您可以使用window.location.search属性检查查询字符串参数是否存在,然后采取相应措施。

关于javascript - 调用网页时,使用URL自动按下“接受”按钮(javascript),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48438366/

10-11 23:54
查看更多