How to read the Selected HREF text

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 64
Joined: Thu Mar 14, 2013 6:10 am

Mon Apr 08, 2013 5:23 am

How can I read the HREF Text , suppose the above shown PHP coding => General is label of my HREF i want to display general page once user clicks on it.

I also want to validate it for validation I need to read back the text of the selected HREF item.

how can I do so

I have one sample shown below it returns but I want the text, which is Selected text, how to get that

<a onclick="alert(this.getAttribute('href'))" href="">selected text</a>

php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Mon Apr 08, 2013 6:55 am

Read this, there is an example in this post ... es-part-1/

Post Reply