Attributen instellen in JavaScript

setAttribute
Задание 1

Gegeven element:

html<input id="elem">

Stel zijn attribuut value in op de waarde 'text'.

Задание 2

Gegeven element:

html<input id="elem">

Stel zijn attribuut class in op de waarde 'valid'.