JQuery assign value to a hdn field

ALL<P>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("p").click(function(){       //$("p") is for all <p> ; $("#p") is id of a control
   $("#hdn").val("Pradeepta");//$("#control id").val(value);
alert($("#hdn").val())              //.click is for click event
  });
});
</script>
</head>
<body>
<input type="hidden" name="hdn"  id="hdn"/>
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
</body>
</html>

ID OF < P >
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("#p1").click(function(){
   $("#hdn").val("Pradeepta");
alert($("#hdn").val())
  });
});
</script>
</head>
<body>
<input type="hidden" name="hdn"  id="hdn"/>
<p>If you click on me, I will disappear.</p>
<p id="p1">Click me away!</p>
<p>Click me too!</p>
</body>
</html>