Is there any way to stop the page from loading the next page when someone clicks on a <a>
tag instead i want it to give the href value so for example "www.google.com" and then do a jquery .load()
which is like this刪除默認<a href> action
$(".window").load(hrefvalue);
i know i could just change all the href values to fire up a javascript function but that takes a bit of time so im just looking for the easiest way.
so i want it to do
- stop the page loading the next part on a
<a href
click. - get the href value e.g http://www.google.com。
- 然後做一個jquery
(.load()
或$.ajax()
)調用href頁面。
看一看的preventDefault:https://developer.mozilla.org/en/DOM/event.preventDefault http://api.jquery.com/event。 preventDefault/ – n3on 2012-04-13 23:09:57
您不能從另一個域名'.load' – 2012-04-13 23:11:10