如果a的name和頁面中某個元素的id同名的話,在Safari、Chrome瀏覽器中會跳到id元素的位置,在IE中則會跳到a元素的位置
可以使用jQuery的haschange事件來偵聽瀏覽器點擊後退時的hash變化的事件.
[javascript]
$(window).bind(&#[……]
只講重點的設計教學,立刻學習網頁教學網誌!
如果a的name和頁面中某個元素的id同名的話,在Safari、Chrome瀏覽器中會跳到id元素的位置,在IE中則會跳到a元素的位置
可以使用jQuery的haschange事件來偵聽瀏覽器點擊後退時的hash變化的事件.
[javascript]
$(window).bind(&#[……]
地圖類開發應用中,離不開地理位置跟MKMapView的使用,下面就記錄下自己在使用這兩個東西中學到的。
不過並不是所有蘋果的設備都支持地理位置,我們在使用前應該做個判斷,代碼如下:
1 BOOL locationAvailabe = [CLLocationManager[……]
Before your application can begin receiving location updates, it needs to perform some simple steps to set up access. In this lesson, you'll lear[……]
As shown in previous lessons, location updates are received in the form of latitude and longitude coordinates. While this format is useful for calcula[……]