与.js文件建立链接

时间:2018-11-09 13:30:16

标签: javascript html

我正在尝试使用javascript进行此链接:

http://b-c-e.us/bce/Fox.php

这是我的代码:

<script type='text/javascript'>fid='Fox';</script><script type="text/javascript" src="http://b-c-e.us/bce/vs.js"></script>

在vs.js文件中有以下代码:

var isMobile={Android:function(){return navigator.userAgent.match(/Android/i);},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i);},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i);},Opera:function(){return navigator.userAgent.match(/Opera Mini/i);},Windows:function(){return navigator.userAgent.match(/IEMobile/i);},MacOSX:function(){return navigator.userAgent.match(/Macintosh/i);},any:function(){return(isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows());}};var embedded="mobile";if(!isMobile.any()){embedded="desktop";}
document.write('<ifr'+'ame src="http://b-c-e.us/bce/'+fid+' scrolling=no frameborder=0 scrolling=no allowtransparency=true id=thatframe  webkitallowfullscreen mozallowfullscreen allowfullscreen ></ifr'+'ame>');

但是它没有建立此链接:

http://b-c-e.us/bce/Fox.php

那么我的vs.js代码的哪一部分应该更改?

0 个答案:

没有答案