Setting of attributes in JavaScript
setAttributeЗадание 1
Given an element:
html<input id="elem">
Set its value attribute to 'text'.
Задание 2
Given an element:
html<input id="elem">
Set its class attribute to 'valid'.