本文介紹了電子節點集成不起作用,也是一般奇怪的電子行為的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我是 Electron 的新手,我一直在努力讓它發揮作用.我遇到了我無法解釋的行為,所以總結一下:我無法讓 Electron 和 html 之間的通信正常工作
<塊引用>未捕獲的引用錯誤:未定義要求"在網站內部,即使我有 nodeIntegration:true
文件樹:./索引.htmlindex.js包-lock.json包.json節點模塊/
index.js:
const electron = require("electron");const Ffmpeg = require("fluent-ffmpeg");const CmdExec = require('child_process');常量 {應用程序,瀏覽器窗口,ipcMain} = 電子;函數創建窗口(){//如果我把主窗口ini放到這里,然后調用app.on("ready", createWindow());應用程序說//Cant create window before ready",即使我只是將函數從準備好的內部移動到這里..}app.on('準備好了', () => {主窗口 = 新瀏覽器窗口({網絡偏好:{節點集成:真}});mainWindow.loadURL(`${__dirname}/index.html`);});ipcMain.on("video:submit", (event, path) =>{CmdExec.exec("echo hello", (value)=>{console.log(value)});});
html:
<html><頭><元字符集=utf-8"><meta http-equiv=X-UA-Compatible"內容=IE=邊緣"><標題></標題><元名稱=描述";內容="><元名稱=視口"內容=寬度=設備寬度,初始比例= 1"><link rel="樣式表";href=""></頭><身體><h1>歡迎!</h1><div><br><label for=""></label><輸入類型=文件"接受=視頻/*";名稱=";id="></div><button type="提交">獲取信息</button></表格><腳本>const electron = require(電子");electron.send('執行動作', args);document.querySelector("form").addEventListener("submit", (event) => {event.preventDefault();const {path} = document.querySelector("input").files[0];window.api.send("video:submit", path);});//嘗試了我在stackoverflow上找到的多種方法,不認為我實現它們正確//盡管</腳本></身體></html></code></pre><p>package.json:</p><pre><代碼>{名稱":媒體編碼器",版本":1.0.0",描述":",主":index.js",腳本":{電子":電子".},作者":",許可證":ISC",依賴":{電子":^12.0.0";}}</code></pre><p></p><div id="qwawimqqmiuu" class="h2_lin"> 解決方案 </div><p>Electron 12 現在默認了 <code>contextIsolation</code> 到 <code>true</code>,這會禁用 Node (這里 是發行說明;和 這是 PR).</p><p>這里對此更改進行了討論.<code>nodeIntegration</code> 將在未來的 Electron 版本中刪除.</p><p>解決此問題的最簡單方法是簡單地禁用上下文隔離:</p><pre><code class='language-html'>mainWindow = new BrowserWindow({網絡偏好:{節點集成:真,上下文隔離:假}});</code></pre><p>話雖如此,出于安全原因,您可能需要考慮啟用 <code>contextIsolation</code>.請參閱本文檔,了解為什么此功能可以增強應用程序的安全性.</p><p>I'm new to Electron, and I've really been struggling with getting it to work. I'm experiencing behavior I cannot explain, so here's a sum:
I cannot get the communication between Electron and the html to work</p><blockquote>
<p>"Uncaught ReferenceError: require is not defined" inside the website, even though I have nodeIntegration:true</p>
</blockquote><p>
</p><pre><code class='language-html'>File Tree:
./
index.html
index.js
package-lock.json
package.json
node_modules/
</code></pre><p>index.js:</p><pre><code class='language-html'>const electron = require("electron");
const Ffmpeg = require("fluent-ffmpeg");
const CmdExec = require('child_process');
const {
app,
BrowserWindow,
ipcMain
} = electron;
function createWindow() {
//If I put the main window ini into here, and then call app.on("ready", createWindow()); app says
//"Cant create window before ready", even though I just moved the funcion from inside ready to here..
}
app.on('ready', () => {
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});
mainWindow.loadURL(`${__dirname}/index.html`);
});
ipcMain.on("video:submit", (event, path) =>{
CmdExec.exec("echo hello", (value)=>{console.log(value)});
});
</code></pre><p>html:</p><pre><code class='language-html'><html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
<body>
<h1>WELCOME!</h1>
<script src="" async defer></script>
<form action="">
<div>
<br>
<label for=""></label>
<input type="file" accept="video/*" name="" id="">
</div>
<button type="submit">get info</button>
</form>
<script>
const electron = require("electron");
electron.send('perform-action', args);
document.querySelector("form").addEventListener("submit", (event) => {
event.preventDefault();
const {path} = document.querySelector("input").files[0];
window.api.send("video:submit", path);
});
//Tried multiple methos Ive found on stackoverflow,, dont think I implemented them right
//though
</script>
</body>
</html>
</code></pre><p>package.json:</p><pre><code class='language-html'>{
"name": "media_encoder",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"electron": "electron ."
},
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^12.0.0"
}
}
</code></pre><p>
</p><div id="qwawimqqmiuu" class="h2_lin"> 解決方案 </div><p>Electron 12 is now defaulting <code>contextIsolation</code> to <code>true</code>, which disables Node (here are the release notes; and here's the PR).</p>
<p>Here's a discussion of this change. <code>nodeIntegration</code> for what it's worth is going to be removed in a future Electron version.</p>
<p>The easiest way to fix this is to simply disable context isolation:</p><pre><code class='language-html'>mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
</code></pre><p>That being said, you might want to consider keeping <code>contextIsolation</code> enabled for security reasons. See this document explaining why this feature bolsters the security of your application.</p>
<p>這篇關于電子節點集成不起作用,也是一般奇怪的電子行為的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!</p>
<div id="qwawimqqmiuu" class="alert alert-info" style="margin-top:20px;">【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!</div>
</div>
<div id="qwawimqqmiuu" class="topcard-tags" style="clear:both;"></div>
<ul class="list-group">
<li id="qwawimqqmiuu" class="list-group-item">
<a href='/asklib/web/19121.html'>上一篇:將 desktopCapturer 從 Electron 應用程序保存到視頻文</a>
<a href='/asklib/web/19123.html' class='text-muted pull-right'>下一篇:樣式中帶有 :host 的 Polymer @import 主題文件沒有影</a>
</li>
</ul>
</div>
</div>
</div>
<!-- row end -->
<div id="qwawimqqmiuu" class="row row-sm">
<div id="qwawimqqmiuu" class="col-sm-12 col-md-12 col-lg-12">
<div id="qwawimqqmiuu" class="card">
<div id="qwawimqqmiuu" class="title">
<h1>相關文檔推薦</h1>
</div><!-- l -->
<div id="qwawimqqmiuu" class="list_con">
<div id="qwawimqqmiuu" class="title">
<a href="/asklib/web/19436.html" title="discord.js v12:我如何等待 DM 頻道中的消息?">discord.js v12:我如何等待 DM 頻道中的消息?</a>
</div>
<div id="qwawimqqmiuu" class="summary">discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)</div>
</div>
<!-- l end -->
<!-- l -->
<div id="qwawimqqmiuu" class="list_con">
<div id="qwawimqqmiuu" class="title">
<a href="/asklib/web/19435.html" title="如何讓我的機器人提及發出該機器人命令的人">如何讓我的機器人提及發出該機器人命令的人</a>
</div>
<div id="qwawimqqmiuu" class="summary">how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)</div>
</div>
<!-- l end -->
<!-- l -->
<div id="qwawimqqmiuu" class="list_con">
<div id="qwawimqqmiuu" class="title">
<a href="/asklib/web/19434.html" title="如何修復必須使用導入來加載 ES 模塊 discord.js">如何修復必須使用導入來加載 ES 模塊 discord.js</a>
</div>
<div id="qwawimqqmiuu" class="summary">How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)</div>
</div>
<!-- l end -->
<!-- l -->
<div id="qwawimqqmiuu" class="list_con">
<div id="qwawimqqmiuu" class="title">
<a href="/asklib/web/19433.html" title="如何列出來自特定服務器的所有成員?">如何列出來自特定服務器的所有成員?</a>
</div>
<div id="qwawimqqmiuu" class="summary">How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)</div>
</div>
<!-- l end -->
<!-- l -->
<div id="qwawimqqmiuu" class="list_con">
<div id="qwawimqqmiuu" class="title">
<a href="/asklib/web/19432.html" title="Discord bot:修復“找不到 FFMPEG"">Discord bot:修復“找不到 FFMPEG"</a>
</div>
<div id="qwawimqqmiuu" class="summary">Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)</div>
</div>
<!-- l end -->
<!-- l -->
<div id="qwawimqqmiuu" class="list_con">
<div id="qwawimqqmiuu" class="title">
<a href="/asklib/web/19431.html" title="使用 discord.js 加入 discord 服務器時的歡迎消息">使用 discord.js 加入 discord 服務器時的歡迎消息</a>
</div>
<div id="qwawimqqmiuu" class="summary">Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)</div>
</div>
<!-- l end -->
</div>
</div>
</div>
</div>
<!-- left end-->
<!-- right -->
<div id="qwawimqqmiuu" class="col-sm-12 col-md-12 col-lg-3">
<!-- row -->
<div id="qwawimqqmiuu" class="row row-sm">
<div id="qwawimqqmiuu" class="col-sm-12 col-md-12 col-lg-12">
<div id="qwawimqqmiuu" class="card">
<label class="main-content-label ">欄目導航</label>
<div id="qwawimqqmiuu" class="cate mt-20"><a href='/asklib/web/' class='cur'>前端問題解決</a><a href="/asklib/java/" title="Java問題">Java問題</a><a href="/asklib/php/" title="php問題">php問題</a><a href="/asklib/python/" title="Python問題">Python問題</a><a href="/asklib/csharp/" title="C#/.NET問題">C#/.NET問題</a><a href="/asklib/c/" title="C/C++問題">C/C++問題</a><a href="/asklib/m/" title="移動開發問題">移動開發問題</a><a href="/asklib/db/" title="數據庫問題">數據庫問題</a><div id="qwawimqqmiuu" class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- row end -->
<!-- row -->
<div id="qwawimqqmiuu" class="row row-sm">
<div id="qwawimqqmiuu" class="col-sm-12 col-md-12 col-lg-12">
<div id="qwawimqqmiuu" class="card">
<label class="main-content-label ">最新文章</label>
<ul class="n-list"><li>
<a href="/asklib/web/15445.html" title="在javascript中將GBK轉UTF-8的實例代碼">• 在javascript中將GBK轉UTF-8的實例...</a>
</li>
<li>
<a href="/asklib/web/15441.html" title="AJAX在GBK編碼頁面中傳中文參數亂碼如何解決?">• AJAX在GBK編碼頁面中傳中文參...</a>
</li>
<li>
<a href="/asklib/web/16094.html" title="CSS nth-child 表示大于和小于">• CSS nth-child 表示大于和小于...</a>
</li>
<li>
<a href="/asklib/web/15468.html" title="為什么 .class:last-of-type 不能按我的預期工作?">• 為什么 .class:last-of-type 不能按...</a>
</li>
<li>
<a href="/asklib/web/16065.html" title="用 :nth-child 選擇一半的元素?">• 用 :nth-child 選擇一半的元素...</a>
</li>
<li>
<a href="/asklib/web/15500.html" title="CSS選擇器用于選擇另一個元素之前的元素?">• CSS選擇器用于選擇另一個元素...</a>
</li>
<li>
<a href="/asklib/web/15508.html" title="每隔三個元素設置樣式?">• 每隔三個元素設置樣式?...</a>
</li>
<li>
<a href="/asklib/web/16800.html" title="CSS 兄弟選擇器(選擇所有兄弟)">• CSS 兄弟選擇器(選擇所有兄弟...</a>
</li>
<li>
<a href="/asklib/web/16815.html" title="cookie 是否保護令牌免受 XSS 攻擊?">• cookie 是否保護令牌免受 XSS...</a>
</li>
<li>
<a href="/asklib/web/17413.html" title="錯誤 [ERR_REQUIRE_ESM]:不支持 ES 模塊的 require()">• 錯誤 [ERR_REQUIRE_ESM]:不支持 ...</a>
</li>
<li>
<a href="/asklib/web/15466.html" title="CSS3 的 :root 偽類和 html 有什么區別?">• CSS3 的 :root 偽類和 html 有什么...</a>
</li>
<li>
<a href="/asklib/web/15471.html" title="是否有 CSS 不等于選擇器?">• 是否有 CSS 不等于選擇器?...</a>
</li>
</ul>
</div>
</div>
</div>
<!-- row end -->
<!-- row -->
<div id="qwawimqqmiuu" class="row row-sm">
<div id="qwawimqqmiuu" class="col-sm-12 col-md-12 col-lg-12">
<div id="qwawimqqmiuu" class="card">
<label class="main-content-label ">熱門文章</label>
<ul class="n-list"><li>
<a href="/asklib/web/15445.html" title="在javascript中將GBK轉UTF-8的實例代碼">• 在javascript中將GBK轉UTF-8的實例...</a>
</li>
<li>
<a href="/asklib/web/15441.html" title="AJAX在GBK編碼頁面中傳中文參數亂碼如何解決?">• AJAX在GBK編碼頁面中傳中文參...</a>
</li>
<li>
<a href="/asklib/web/16094.html" title="CSS nth-child 表示大于和小于">• CSS nth-child 表示大于和小于...</a>
</li>
<li>
<a href="/asklib/web/15468.html" title="為什么 .class:last-of-type 不能按我的預期工作?">• 為什么 .class:last-of-type 不能按...</a>
</li>
<li>
<a href="/asklib/web/16065.html" title="用 :nth-child 選擇一半的元素?">• 用 :nth-child 選擇一半的元素...</a>
</li>
<li>
<a href="/asklib/web/15500.html" title="CSS選擇器用于選擇另一個元素之前的元素?">• CSS選擇器用于選擇另一個元素...</a>
</li>
<li>
<a href="/asklib/web/15508.html" title="每隔三個元素設置樣式?">• 每隔三個元素設置樣式?...</a>
</li>
<li>
<a href="/asklib/web/16800.html" title="CSS 兄弟選擇器(選擇所有兄弟)">• CSS 兄弟選擇器(選擇所有兄弟...</a>
</li>
<li>
<a href="/asklib/web/16815.html" title="cookie 是否保護令牌免受 XSS 攻擊?">• cookie 是否保護令牌免受 XSS...</a>
</li>
<li>
<a href="/asklib/web/17413.html" title="錯誤 [ERR_REQUIRE_ESM]:不支持 ES 模塊的 require()">• 錯誤 [ERR_REQUIRE_ESM]:不支持 ...</a>
</li>
<li>
<a href="/asklib/web/15466.html" title="CSS3 的 :root 偽類和 html 有什么區別?">• CSS3 的 :root 偽類和 html 有什么...</a>
</li>
<li>
<a href="/asklib/web/15471.html" title="是否有 CSS 不等于選擇器?">• 是否有 CSS 不等于選擇器?...</a>
</li>
</ul>
</div>
</div>
</div>
<!-- row end -->
<!-- row -->
<div id="qwawimqqmiuu" class="row row-sm">
<div id="qwawimqqmiuu" class="col-sm-12 col-md-12 col-lg-12">
<div id="qwawimqqmiuu" class="card">
<label class="main-content-label ">熱門標簽</label>
<div id="qwawimqqmiuu" class="topcard-tags">
<a href="/tag/45_1.html" class="tags tag-1">掃碼點餐</a>
<a href="/tag/53_1.html" class="tags tag-2">門戶</a>
<a href="/tag/52_1.html" class="tags tag-1">驗證碼</a>
<a href="/tag/51_1.html" class="tags tag-2">廣告設計</a>
<a href="/tag/50_1.html" class="tags tag-2">商務合作</a>
<a href="/tag/49_1.html" class="tags tag-1">商城模板</a>
<a href="/tag/48_1.html" class="tags tag-2">bootstrap</a>
<a href="/tag/47_1.html" class="tags tag-1">進銷存系統</a>
<a href="/tag/46_1.html" class="tags tag-1">零售系統</a>
<a href="/tag/54_1.html" class="tags tag-2">ar</a>
<a href="/tag/44_1.html" class="tags tag-1">商城</a>
<a href="/tag/43_1.html" class="tags tag-2">視頻教程</a>
<a href="/tag/42_1.html" class="tags tag-2">微擎</a>
<a href="/tag/41_1.html" class="tags tag-1">o2o</a>
<a href="/tag/40_1.html" class="tags tag-2">分發系統</a>
<a href="/tag/39_1.html" class="tags tag-1">音樂</a>
<a href="/tag/38_1.html" class="tags tag-2">淘寶客</a>
<a href="/tag/37_1.html" class="tags tag-2">discuz模板</a>
<a href="/tag/63_1.html" class="tags tag-1">微小區</a>
<a href="/tag/3482_1.html" class="tags tag-2">seo推廣</a>
<a href="/tag/70_1.html" class="tags tag-1">ai</a>
<a href="/tag/69_1.html" class="tags tag-1">資源</a>
<a href="/tag/68_1.html" class="tags tag-2">小米</a>
<a href="/tag/67_1.html" class="tags tag-2">刷單</a>
<a href="/tag/66_1.html" class="tags tag-2">3d</a>
<a href="/tag/65_1.html" class="tags tag-1">小游戲</a>
<a href="/tag/64_1.html" class="tags tag-2">交友</a>
<a href="/tag/36_1.html" class="tags tag-1">蜘蛛池</a>
<a href="/tag/62_1.html" class="tags tag-1">卡券</a>
<a href="/tag/61_1.html" class="tags tag-1">你畫我猜</a>
<a href="/tag/60_1.html" class="tags tag-1">虛擬幣</a>
<a href="/tag/59_1.html" class="tags tag-1">區塊鏈</a>
<a href="/tag/58_1.html" class="tags tag-1">視頻</a>
<a href="/tag/57_1.html" class="tags tag-1">全景</a>
<a href="/tag/56_1.html" class="tags tag-2">漫畫網</a>
<a href="/tag/55_1.html" class="tags tag-2">OElove</a>
<a href="/tag/10_1.html" class="tags tag-2">按鈕切換</a>
<a href="/tag/18_1.html" class="tags tag-1">博客</a>
<a href="/tag/17_1.html" class="tags tag-2">物流網站</a>
<a href="/tag/16_1.html" class="tags tag-2">游戲模板</a>
<a href="/tag/15_1.html" class="tags tag-2">svg</a>
<a href="/tag/14_1.html" class="tags tag-1">jquery</a>
<a href="/tag/13_1.html" class="tags tag-1">angular</a>
<a href="/tag/12_1.html" class="tags tag-2">360</a>
<a href="/tag/11_1.html" class="tags tag-1">動畫模板</a>
<a href="/tag/19_1.html" class="tags tag-2">攝影</a>
<a href="/tag/9_1.html" class="tags tag-2">動畫特效</a>
<a href="/tag/8_1.html" class="tags tag-1">在線客服</a>
<a href="/tag/7_1.html" class="tags tag-1">扁平</a>
<a href="/tag/6_1.html" class="tags tag-1">地板</a>
<a href="/tag/5_1.html" class="tags tag-2">域名停放</a>
<a href="/tag/4_1.html" class="tags tag-2">域名頁</a>
<a href="/tag/3_1.html" class="tags tag-2">canvas</a>
<a href="/tag/2_1.html" class="tags tag-1">html5</a>
<a href="/tag/27_1.html" class="tags tag-2">小程序</a>
<a href="/tag/35_1.html" class="tags tag-1">thinkphp</a>
<a href="/tag/34_1.html" class="tags tag-2">視頻打賞</a>
<a href="/tag/33_1.html" class="tags tag-1">java視頻</a>
<a href="/tag/32_1.html" class="tags tag-1">挖礦網</a>
<a href="/tag/31_1.html" class="tags tag-1">養生網</a>
<a href="/tag/30_1.html" class="tags tag-2">帝國cms</a>
<a href="/tag/29_1.html" class="tags tag-2">微信程序</a>
<a href="/tag/28_1.html" class="tags tag-1">電影源碼</a>
<a href="/tag/1_1.html" class="tags tag-2">css3</a>
<a href="/tag/26_1.html" class="tags tag-1">訂單系統</a>
<a href="/tag/25_1.html" class="tags tag-1">微商</a>
<a href="/tag/24_1.html" class="tags tag-1">微擎微贊</a>
<a href="/tag/23_1.html" class="tags tag-2">蘋果cms</a>
<a href="/tag/22_1.html" class="tags tag-1">郵件群發</a>
<a href="/tag/21_1.html" class="tags tag-1">小說源碼</a>
</div>
</div>
</div>
</div>
<!-- row end -->
</div>
<!-- right end -->
</div>
</div>
<footer id="footer">
<div id="qwawimqqmiuu" class="container" style="width:1440px;">
<div id="qwawimqqmiuu" class="row hidden-xs">
<div id="qwawimqqmiuu" class="col-sm-12 col-md-9 col-lg-9 site-link">
<ul class="list-inline">
<li><a href="http://m.suosuyi.cn" title="網站首頁">網站首頁</a></li> - <li><a target="_blank" href="/about/contact/" rel="nofollow">聯系我們</a></li>- <li><a target="_blank" href="/about/sm/" rel="nofollow">免責聲明</a></li>- <li><a target="_blank" href="/about/ad/" rel="nofollow">網站公告</a></li> - <li><a href="http://m.suosuyi.cn/tags.xml" title="標簽分類">標簽分類</a>- <li><a href="http://m.suosuyi.cn/sitemap.xml" title="網站地圖">網站地圖</a></li>
</ul>
<div id="qwawimqqmiuu" class='copyrig'>Copyright © 2022-2023 HTML5模板網 版權所有并保留所有權 <a target="_blank" rel="nofollow">粵ICP備14083021號</a></div>
</div>
</div>
</div>
</div>
</footer>
<script type="text/javascript" src="http://m.suosuyi.cn/assets/js/highlight.min.js">
感谢您访问我们的网站,您可能还对以下资源感兴趣:
久久久久久久av|日韩在线中文|看一级毛片视频|日本精品二区|成人深夜福利视频|武道仙尊动漫在线观看
主站蜘蛛池模板:
日韩精品成人av
|
日韩视频在线免费观看
|
www.国产91|
av在线一区二区三区
|
一级黄色影片在线观看
|
www.操.com|
97伊人
|
精品久久久久久久久久久久
|
91原创视频|
一区二区三区影院
|
久久黄视频
|
中文精品视频
|
成人黄色电影免费
|
国产精品s色
|
午夜精品影院
|
免费黄色a视频
|
99精品一区二区三区
|
一区二区三区网站
|
成人免费观看男女羞羞视频
|
黄视频免费
|
免费网站国产
|
午夜影院在线
|
国产亚洲精品久久久久动
|
亚洲综合二区
|
最新国产精品视频
|
国产免费一区
|
在线免费观看黄色
|
精品二区视频
|
天天拍天天操
|
日日精品|
韩国久久
|
久久看精品
|
国产成人综合亚洲欧美94在线
|
91精品国产一区二区在线观看
|
99久久电影
|
成人精品久久
|
日日碰狠狠躁久久躁婷婷
|
91社影院在线观看
|
国产区精品
|
97操操
|
午夜码电影
|
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
<tr id="ksw8s"><ul id="ksw8s"></ul></tr><rt id="ksw8s"></rt><rt id="ksw8s"></rt>