what is the right way?

what is the right way?

Hi just wanting to know what is the right way to add a INPUT field to the html page using jquery that will make it work correctly and as if it were hard coded?