I have the following code
<a href="process.html">cholera</a>
I want to pass cholera to process.html onClick. Is there any way to do that in HTML?
If no, PHP scripts are also most welcome.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In pure HTML, only by pre-populating the link with the correct value:
for anything that fetches the link’s contents automatically, you would have to use JavaScript. This is comparably easy to do in jQuery. (Update: @James M presents a simple and nice non-jQuery solution in his answer.)
On the receiving end, though, you are going to need some kind of server language (or JavaScript) to do anything with the passed argument.