Html5无刷新修改browser Url的方法
摘要:Ajax局部刷新可以通过HTML5的新特性修改browseraddress。window.history表示window对象的历史记录win...
Ajax局部刷新可以通过HTML5的新特性修改browser address。
window.history表示window对象的历史记录
window.history.pushState(object, title, new_url) -- 在window.history里新增一个历史记录点
window.history.replaceState(object, title, new_url) -- 在window.history替换当前page的历史记录点
object - 可以扩展想要的object
title - 目前所有浏览器都不支持
new_url 浏览器不会检查url是否存在,只改变url,url必须同域,不能跨域
eg: original url: www.test.com
window.history.pushState({time: 'test'}, ' ', 'www.test_test.com')
【Html5无刷新修改browser Url的方法】相关文章:
★ html5 Canvas画图教程(8)—canvas里画曲线之bezierCurveTo方法
★ HTML5 canvas画矩形时出现边框样式不一致的解决方法
★ HTML5 Web Database 数据库的SQL语句的使用方法