| 1. |
Solve : Can't understand this href? |
|
Answer» I'm trying to teach myself HTML and Javascript. The basic books SEEMS to skip over some "basics." I've spent the last 4 hours with my nose in reference books and in search engines trying to find out what the "#" in the following link tag means. I read this in one of my instructional books and I am just plain stuck. Here it is # is just a filler. It doesn't mean anything. You usually put it in an href when you are doing some sort of scripting with javascript and the script is doing the relocation or other work. I've used the # when using an onmouseover, or onclick, or other onmouse events. That's the answer. ok.... You guys are just going to confuse the OP. michaewlewis is on the RIGHT track...it typically just acts as filler. If you use that in place of a URL, it won't do anything. Well, aside from redirecting you to the TOP of the page. Technically, that's what it is designed to do: redirect viewers to different sections of the page. Because # alone is empty, it redirects to the top. However, you can control its actions by applying name anchors throughout your page. For example, if you have a music section on your page, you can make something like this... My Music[/url] Then, when someone clicks on the below link... LINK[/url] ...it will automatically redirect them to the My Music section. It can be quite useful. When it comes to needing non-linking filler, I prefer using javascript: void(0); rather than #. |
|