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
あなたは別のドメインから '$ .load'することはできません –