0

I have two html pages On page one I have stored the value of clicked anchor tag into a variable. Now I just want to send this variable value to page2.html and show it there. My code is as under:

<body>
<a href="page2.html" class="#images\shahbaz.jpg" onClick= "myFunction(this.className);"> Hello </a> <br /> <br />

<script>
function myFunction (className){
var abc = className;
document.write(abc);
}
</script>
</body>
Jahangir
  • 11
  • 2

0 Answers0