The usage of '#'


I just noticed something I couldn't understand. What is the usage of '#'? Is it a shortcut to refer the previously mentioned webpage? Or does it have another meaning?

Replace this line with your code. 



This is known as a hash, and is the last part of an URL.


When it is the only character in the string, it refers to the current address in the location bar (the webpage you are on). such a link will only scroll the page to the top if is not already there.

When followed by more characters, that is an id attribute of an element (or page fragment) in the page. Clicking a link with that in it will scroll the page so that element is above the fold, and its top line at the top of the window.

This is way out of the park, but you will find it interesting in months or years to come...

A regular expression to validate a URL

I found this link in the following article...

Again, this is very removed from what you are doing so please do not let yourself get segued. Bookmark this topic with a useful name, like 'RegExp URL example' so you can find it later. The subject is far too removed to explore at this time.


I get it now. Thank you


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.