AJAX href ='#'浏览网址
This is a simplistic version of what I'm trying to do, but when you click on the link it redirects the page to the url + #, this is creating an additional navigation step when attempting to use the browser back button.
If I remove the href it doesn't work, if I change it to href='' then it refreshes the page every single time.
What is the proper way to handle this? I'm still attempting to learn jQuery / AJAX, so this may be a very basic question.
http://jsfiddle.net/bvp8xa5x/
HTML
<div id='updateMe'>Old Value</div>
<a href='#' id='test'>Test</a>
jQuery
$(function(){
$('#test').click(function(){
$.ajax({
type: "GET",
url: '',
success: function(data) {
$('#updateMe').html('New Value');
}
});
return false;
});
});
相关知识
a href=#1首版a a href=#1尾版a a href=#1A11版a
href=#|href=javascript:;|href=javascript:void(0)之用法区别,超级链接也能玩出花!
php login json,ajax + php + json = login
ajax实现在线投票,10分钟实现Ajax Vote投票、评分功能(Stars)
href=“JavaScript:;”是啥意思?
11个基于HTML/CSS/JS的情人节表白可爱小游戏、小动画【情人节主题征文】
javascript:void(0);用法及常见问题解析
Python爬虫基本流程梳理:构造请求头、发起请求、json格式数据解码转码、读写CSV文件——基于AJAX网页爬虫
兰州园艺学校网站网址主页
鲜花配送网上花店网址,51788鲜花
网址: AJAX href ='#'浏览网址 https://www.huajiangbk.com/newsview1293674.html
上一篇: Cmake编译文件若需要手动添加 |
下一篇: Focus on Flowers |
推荐分享

- 1君子兰什么品种最名贵 十大名 4012
- 2世界上最名贵的10种兰花图片 3364
- 3花圈挽联怎么写? 3286
- 4迷信说家里不能放假花 家里摆 1878
- 5香山红叶什么时候红 1493
- 6花的意思,花的解释,花的拼音 1210
- 7教师节送什么花最合适 1167
- 8勿忘我花图片 1103
- 9橄榄枝的象征意义 1093
- 10洛阳的市花 1039