0
//實際webscript科爾多瓦在應用內瀏覽器中打開外部腳本
<script type="text/javascript">
var lhnAccountN = "310904-1";
var lhnButtonN = 38;
var lhnInviteEnabled = 1;
var lhnWindowN = 0;
var lhnDepartmentN = 36316;
var lhnChatPosition = 'bottomright';
</script>
<a href="http://www.livehelpnow.net/products/live-chat-system" target="_blank" style="font-size:10px;" id="lhnHelp">best live chat</a>
<script src="//www.livehelpnow.net/lhn/widgets/chatbutton/lhnchatbutton-current.min.js" type="text/javascript" id="lhnscript"></script>
//中的數據存儲在會話。每次連接丟失。
//所以我使用應用內瀏覽器在離子移動應用程序中打開腳本。我無法打開窗口,請幫我出去
$rootScope.testChat=function(){
var options = {
location: 'no',
clearcache: 'yes',
toolbar: 'yes'
};
var ref=window.open('http://www.livehelpnow.net/products/live-chat-system', '_blank', options);
ref.addEventListener('loadstop', function() {
ref.executeScript({
code:"var lhnAccountN = '310904-1';var lhnButtonN = 38;var lhnInviteEnabled = 1;var lhnWindowN = 0;var lhnDepartmentN = 36316;var lhnChatPosition = 'bottomright';"
})
ref.executeScript({
code:"var chat; chat.src='www.livehelpnow.net/lhn/widgets/chatbutton/lhnchatbutton-current.min.js' chat.id='lhnscript'"
})
})
}
<a href="http://www.livehelpnow.net/products/live-chat-system" target="_blank" style="font-size:10px;"ng-click="testChat()" id="lhnHelp">best live chat</a>
嗨,我們無法加載腳本。應用內瀏覽器運行良好。窗口打開。 – Harish98
@HarishKesari嘗試將整個腳本寫入js文件,然後嘗試加載腳本。使用檢查設備查找執行過程中可能發生的任何錯誤。 –