English 中文(简体)
1. 历史活动——潮 of(#)型
原标题:History event - hash(#) type of url

页: 1 我不想使用某些杂草料。 我只想知道他们是如何做到这一点的,因此我可以提出这样的文字。

在html5年历史中,我们利用<代码>window.onpopstate活动探测背/浏览器。 我想做的是创造这样的东西,这样,我就能够利用hash类型 url,用于其他不支持的浏览器 html 5

例如:

if(history.pushState){
   //use html5 history event
   window.onpopstate = function(event){that.__loadCurrentLink();};
}else{
   //use the History event for other browser
   window.historyEvent = function(event){that.__loadCurrentLink();};        
}

你可以gu笑一些东西,这样我会知道如何这样做。

我只是为了学习目的,为想要知道如何这样做的其他人这样做。 我希望,一些 j夫的mon魔能够引导我们前进。

最佳回答

Assign an activityhandler for the hashchange event todow and use a setInterval for long browsers to Poll window.place. place.hash 每100米,就这样,当洗衣得到支持时,你就可以获得迄今为止的散装。

我也建议写你的链接,按纽芬兰语等称职,对 has子进行 checks制,以便在你点击改变 has子的环节时,几乎不会拖延。

Hashchange support in browsers: caniuse.com

问题回答

许多年长的浏览器在本地不支持洗衣活动。 我认为,把这一功能推向活动听众的方式是,利用一套间隔时间不断对冲洗进行污染。

在IE7发生“hash change”时,没有发生火灾,这个问题得到了更好的描述。

关于窗户,地点:hash - 变化?

由于你对“贱民解决方案”感兴趣,我建议你读到国际电子7的最佳答案的顶点。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签