我的功能()调用在手机上不起作用



g'day all,

我希望您能帮助我弄清为什么我的功能()在我的"博客"帖子中呼叫,仅在台式机和平板电脑上工作,而在手机上不使用?

我将以下代码放入了"博客"模板的头部,并将其称为帖子,如下所示。它可以在桌面和iPad显示器上使用,但在显示手机显示上不使用。

如果我删除函数()comand并将代码直接插入帖子,则它可以在所有设备上使用,因此我不明白为什么它在函数上不适用于Mobiles。

<!--MyAds Start-->
<script language="JavaScript">
<!-- Begin
var total_banner = 3;
var actual_time = new Date()
var second = actual_time.getSeconds()
var show_the_banner = second % total_banner;
show_the_banner +=1;
if (show_the_banner==1) {
txt="Comprehensive Babies, Parent - Teacher <br /> Swimming Lesson Plan";
url="http://www.swimteaching.com/2015/05/comprehensive-babies-parent-teacher.html";
alt="Image of a baby swimming";
banner="http://1.bp.blogspot.com/-kH9zGxIMnxw/VTsVL8jwkwI/AAAAAAAABBI/a1sx-GrBsSE/s320/baby_child_swim.jpg";
width="250";
height="190";
}
if (show_the_banner==2) {
txt="Get Your Free<br />Swim Lesson Plans Here";
url="http://swimteaching.yolasite.com/lesson-plans-actual.php";
alt="Image of swim teacher helping a child float";
banner="http://2.bp.blogspot.com/-GA8EJHSPug4/SOQFcHZ6oSI/AAAAAAAAAK0/eX7vsIalmfc/s320/FloatBackTeacherHead.jpg";
width="200";
height="100";
}
if (show_the_banner==3) {
txt="Get Your<br />Professional Swimming Lesson Plans<br />Here";
url="http://www.swimteaching.com/2015/04/professional-swiming-lesson-  plans.html";
alt="Image of swim teach teaching";
banner="http://4.bp.blogspot.com/-2dpWzVuQqGg/Ux6h5Q2Ti_I/AAAAAAAAAvk/EjHf05GcRXc/s320/How%2Bto%2BFind%2Bthe%2BRight%2BSwim%2BTeacher%2Bfor%2BYour%2BChild%2527s%2BNeeds.JPG";
width="250";
height="100";
}
function myads(){
document.write('<center>');
document.write('<a href="' + url + '" target="_top">');
document.write('<img src="' + banner + '" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt="' + alt + '" border=0><br>');
document.write('<large><strong>' + txt + '</strong></large></a>');
document.write('</center>');
}
// End -->
</script>
<!--MyAds End-->

以下插入邮政的代码

<!--MyAds Start-->
<script language="JavaScript">
myads();
</script>
<!--MyAds End-->

您的帮助非常感谢理查德

window.onload=function(){
    myads();
}

相关内容

  • 没有找到相关文章

最新更新