Retrive "name" value of an checkbox
I have a variable "nonsopiu" containing a html string like this <input type="checkbox" class="miaclasse" name="1"> <span>something</span>
alert(nonsopiu);
give <input type="checkbox" class="miaclasse" name="1"> <span>something</span>
I want to have value of "name" of input field in a new variable but i don't know how ..