I have a javascript var temp ;


var temp= "<table><tr><td><input type="text" name="source0" value="" /></td></tr></table>" ;

I want to modify the contents of temp. I want to modify the value of "name" field . ( // red marked)

How to modify the contents of temp variable ?

I want an output:
temp= "<table><tr><td><input type="text" name="source1" value="" /></td></tr></table>" ;

Looking for a jquery solution.