manumiglani
how to make links with javascript ?
|
|
how to make links with javascript ?manumiglani
how to make links with javascript ?
Stubru Freak
Works better like this:
But it isn't javascript anymore then manumiglani
it is not totally right i think. it shows the output
instead of Go here. elekis
it's cause you forgot
<script > .. </script> and for search engine,the-y has a url something like that
to found blabla under google. so if you wanna search with google by exemple just change q= ... a+++ manumiglani
adding <script > .. </script> shows the link but linked to
instead of google.be Stubru Freak
Doesn't it work when you click it? You could also just remove the javascript:document.location.href=\' and the \' at the end and just keep http://google.be Atomo64
fixing the first code...
should be:
First, when using javascript on links you have to make sure that the javascript is being used on onclick, because with browsers that doesn't support javascript would fail trying to open the link. And you can't use </ on javascript, it is because some browsers could fail and think that that's the end of the script, you have to use <\/
or using javascript:
manumiglani
so u provided two codes Atomo, which one i shd use if i do not want that lh\inks to be crawled by search engines ? Atomo64
If that's what you want... none!; first, you can use robots.txt to order the robots not to index that page, you can use the <meta> tag on each page to prevent the robots from indexing that page and... and there are many other ways.,..
Ranfaroth
Most people on this thread should read this article..
![]() Atomo64
I don't agree with some of points of that article... for example... <noscript> is commonly used for text based browsers (just as an example, because there can me more situations where you don't have JS support, as in some mobile phones), ... etc... there are just some things like the void(0) link and the href="javascript:jjj()" thing that I agree.
Related topics
|