I have a bookmarklet that gets the value of the field named "answer" and then adds text to the end as follows:
document.getElementsByName('answer')[0].value+='added text'
Is there a way to modify the value of the field that the cursor is in without coding the field name?