How to move the cursor position in the input text box by clicking the label label?
Use the for attribute. No need for javascript.
for
<label for="name">Name</label><input type="text" id="name" name="name" />
The browser will do the magic on its own.
I donβt know why Yi Jiang answer will not work, but it is trivial in jQuery if you prefer to do it this way
$('#myLabel').click(function() { $('#myTextBox').focus(); });