日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php js 批量打开页面

發布時間:2023/12/31 php 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php js 批量打开页面 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

獲取網址中的url

//瀏覽器console中加入jquery方便調試 var jquery = document.createElement('script'); jquery.src = "http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js";//若調試頁面是https的這里也修改為https. document.getElementsByTagName('head')[0].appendChild(jquery); jQuery.noConflict(); //獲取超鏈接中的網址 $('#idtab a').each(function(){var href = $(this).attr('href');console.log(href); });

?php文件:?

<!DOCTYPE html> <html> <head><title></title> </head> <!-- 引入jq --> <script src="https://ajax.microsoft.com/ajax/jquery/jquery-1.4.min.js"></script> <body> <?php //要打開的網址 $sUrl = 'https://www.baidu.com,https://www.baidu.com'; $aUrl = explode(',', $sUrl); $sJosnUrl = json_encode($aUrl); ?><script type="text/javascript">//休眠函數 毫秒function sleep(n) {var start = new Date().getTime();while (true) {if (new Date().getTime() - start > n) {break;}}}var i = <?php echo $sJosnUrl; ?>;$.each(i, function (index, value) {window.open(value);sleep(3000); //3000毫秒打開一個}) </script></body> </html>

?

總結

以上是生活随笔為你收集整理的php js 批量打开页面的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。