I have this code
First of all, I suggest you use a button instead of a reset button. Then you can try this
document.getElementById('button').onclick = function() {
var inputs = document.getElementsByName('s');
for (var i = 0; ii = inputs.length; i < ii; i++) {
inputs[i].value = '';
}
}
However, if you want to use a reset button, you should prevent its default action by calling event.preventDefault()
function.