SyntaxFix
Write A Post
Hire A Developer
Questions
You can clear out their values by just setting value to an empty string:
var1.value = ''; var2.value = '';