草庐IT

histories

全部标签

javascript - Google Analytics 会干扰 Android 浏览器中的 history.back() 吗?

我有一个html5移动应用程序,其中所有内容都在一个页面上,我使用history.back/popstate/etc来更改页面的内容(通过jQueryMobile)。我正在使用GoogleAnalytics跟踪各种事件,并在一个页面上跟踪用户是否通过特定按钮退出:$('#my-back-button').bind('tap',function(){_gaq.push(['_trackEvent','mycategory','myaction']);history.back();returnfalse;});在android2.2浏览器中history.back()被调用但onpopst

javascript - Google Analytics 会干扰 Android 浏览器中的 history.back() 吗?

我有一个html5移动应用程序,其中所有内容都在一个页面上,我使用history.back/popstate/etc来更改页面的内容(通过jQueryMobile)。我正在使用GoogleAnalytics跟踪各种事件,并在一个页面上跟踪用户是否通过特定按钮退出:$('#my-back-button').bind('tap',function(){_gaq.push(['_trackEvent','mycategory','myaction']);history.back();returnfalse;});在android2.2浏览器中history.back()被调用但onpopst

使用 History.js 的 HTML5 pushState。从 State.data 检索数据时遇到问题

我可以将数据设置到History.js的State.data中,如下所示:varpushStateData={};functionRetrieveSearchResults(type,url,searchData){//,showResetButton,controlToFocus,navDirection){pushStateData={SearchType:type,SearchData:searchData,};RetrievePageResults(true,url,pushStateData);}functionRetrievePageResults(pushNewUrl,u

使用 History.js 的 HTML5 pushState。从 State.data 检索数据时遇到问题

我可以将数据设置到History.js的State.data中,如下所示:varpushStateData={};functionRetrieveSearchResults(type,url,searchData){//,showResetButton,controlToFocus,navDirection){pushStateData={SearchType:type,SearchData:searchData,};RetrievePageResults(true,url,pushStateData);}functionRetrievePageResults(pushNewUrl,u

javascript - 无法在 'replaceState' 上执行 'History' <local_URL> 无法在源为 'null' 的文档中创建

我正在为转换创建一个页面。点击页面导航到另一个页面-适用于Firefox,但不适用于Chrome。显示错误:UncaughtSecurityError:Failedtoexecute'replaceState'on'History':AhistorystateobjectwithURL'file:///C:/Users/athite/Desktop/DEMO/page.html'cannotbecreatedinadocumentwithorigin'null'.**这是我的代码:WelcomeToMyHomepageClickonthelinktoseetheslideeffect.

javascript - 无法在 'replaceState' 上执行 'History' <local_URL> 无法在源为 'null' 的文档中创建

我正在为转换创建一个页面。点击页面导航到另一个页面-适用于Firefox,但不适用于Chrome。显示错误:UncaughtSecurityError:Failedtoexecute'replaceState'on'History':AhistorystateobjectwithURL'file:///C:/Users/athite/Desktop/DEMO/page.html'cannotbecreatedinadocumentwithorigin'null'.**这是我的代码:WelcomeToMyHomepageClickonthelinktoseetheslideeffect.

javascript - window.history.back() 不工作。

我无法让它工作。我已经尝试了很长时间。请帮我。functiongoBack(){window.history.back()}GoBack 最佳答案 请看thisquestion:Inconsistencywithwindow.history.back().这个GoBack可能是你要找的AsKevinBsuggestsThebrowsercouldbeinterpretingthebuttonasasubmitbuttonandsubmittingtheform,thuscausingapagerefresh.Addingtype="

javascript - window.history.back() 不工作。

我无法让它工作。我已经尝试了很长时间。请帮我。functiongoBack(){window.history.back()}GoBack 最佳答案 请看thisquestion:Inconsistencywithwindow.history.back().这个GoBack可能是你要找的AsKevinBsuggestsThebrowsercouldbeinterpretingthebuttonasasubmitbuttonandsubmittingtheform,thuscausingapagerefresh.Addingtype="

javascript - 区分 Back/Forward click 和 History.pushState/replaceState 在 statechange 事件中

我正在使用支持HTML5pushState和replaceState的History.js插件。当用户单击后退/前进按钮以及使用pushState/replaceState时,将触发statechange。我需要检查是否从后退/前进按钮或使用pushState/replaceState方法触发了statechange事件。 最佳答案 我没有看过History.js,但是BenAlman'sjQueryBBQ(Back-Button&QueueLibrary)是一个包含“hashchange”事件的优秀库。不过,这可能与您尝试做的不同

javascript - 区分 Back/Forward click 和 History.pushState/replaceState 在 statechange 事件中

我正在使用支持HTML5pushState和replaceState的History.js插件。当用户单击后退/前进按钮以及使用pushState/replaceState时,将触发statechange。我需要检查是否从后退/前进按钮或使用pushState/replaceState方法触发了statechange事件。 最佳答案 我没有看过History.js,但是BenAlman'sjQueryBBQ(Back-Button&QueueLibrary)是一个包含“hashchange”事件的优秀库。不过,这可能与您尝试做的不同