0

我遇到这个问题只是因为我最近购买了一部 iPhone。我的网站 ( http://www.stuartmeyerphotography.com )上图片轮播的 javascript不会在 iPhone 版 Safari 中执行。上次我和一位拥有 Mac 的朋友(一年前)检查过时,我认为它可以在 Mac Safari 上工作,但现在我需要回去检查一下,以确保它在 Mac 上工作。我网站上的“查看源代码”将显示整个 html 页面,但我已从正文部分提取代码以在此处显示:

 <div align="center">
        <div id="div_container"></div>
        <p align="left">
          <script type='text/javascript'>
       carousel({id:'Photos',
          border:'',
          size_mode:'image',
          width:120,
          height:120,
          sides:8,
          steps:75,
          speed:4,
          direction:'left',
          images:['mainthumbs/babiesthumb.jpg','mainthumbs/engagementsthumb.jpg','mainthumbs/dancethumb1.jpg','mainthumbs/artistthumb.jpg','mainthumbs/portraitsthumb1.jpg','mainthumbs/seniorsthumb1.jpg','mainthumbs/wedthumb1.jpg'],
          links:['babies/babies.html','engagements/engagemainshow/engagementpictures.html','dance/dancepictures.html','artists/artists.html','portraits/portraits.html','seniors/highschoolseniors.html','weddings/weddings.html'],
          lnk_base:'',
          lnk_targets:['_iframe1',
                       '_iframe1',
                       '_iframe1',
                       '_iframe1',
                       '_iframe1',
                       '_iframe1',
                       '_iframe1' ],
          lnk_attr:['width=200,height=300,top=200,menubar=yes',
                    'width=300,height=200,left=400,scrollbars=yes',
                    'width=150,height=250,left=200,top=100',
                    ''],
          titles:['Babies',
                  'Engagements',
                  'Dance',
                  'Artists',
                  'Portraits',
                  'HS Seniors',
                  'Weddings'],
          image_border_width:1,
          image_border_color:'#E3F0A1'
          });
      </script></p>
        <p align="left">&nbsp;</p>
      </div>
    </div>  

有什么想法吗?-斯图尔特

4

2 回答 2

1

我通过jslint运行了你的 js ,但出现了很多问题。纠正这些可能会解决您的问题。

于 2010-03-08T15:06:19.193 回答
-1

If you open safari on your mac, there should be a menu item called "Develop". Under there is an item called user agent in which you can switch your desktop browser to behave like the iPhone mobile safari browser. It'll be easier to troubleshoot and conduct your iPhone compatibility tests there.

Depending on what you have installed, some options include:

Mobile Safari 4.0.2 - iPhone Mobile Safari 4.0.2 - iPod Touch Mobile Safari 3.2.2 - iPad etc...

于 2010-11-10T03:07:05.487 回答