Using Field Name as It Value

Using Field Name as It Value

Someone please help me!

I'm trying to get the name of every textfield and set as it value, I'm trying without any success things like this:


$(document).ready(function(){

$("input[name]").val($("input:name"));

or

$("input[name]").val(this.name);

});

;/