<!DOCTYPE html>
<html>
<body>
<input class="exampleClass" />
<br />
<input />
<br />
<input class="exampleClass" />
<br />
<script type='text/javascript'>
var exClass = document.getElementsByClassName('exampleClass');
for(var i = 0; i < exClass.length; i++) {
exClass[i].value = "new Value";
}
</script>
</body>
</html>