Need javascript function help inside .js file

I need to modify or fix the output of a function.

so here it is: -----------

this is where it outputs my variable:
Code:
<p class="pp_description"></p>
(displays a variable)

this is the one part of the large code(modifies or creates the variable ):
Code:
if(pp_descriptions[set_position]!=""){$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));}else{$pp_pic_holder.find('.pp_description').hide();}
The output that i need to change(or just add something to it): html(unescape(pp_descriptions[set_position])); (how do i modify it to get the output like I need.)

I need to get the output to be like
Code:
<input value="$the_output" type="text">
instead of
Code:
<p class="pp_description">$the_output</p>
How can I get what I want?

----my knowledge about js---
Tried like adding "things" to it but the html() function outputs the first value, so I need a solution, add something to the function, I never have written javascript myself, so I guess it's easy to people who know javascript more.
-----

Thank you!