Setting of attributes in JavaScript
Given an element:
<input id="elem">
Set its value attribute to 'text'.
Given an element:
<input id="elem">
Set its class attribute to 'valid'.
Given an element:
<input id="elem">
Set its value attribute to 'text'.
Given an element:
<input id="elem">
Set its class attribute to 'valid'.