1<script>
2 function clear_inputs(){
3 inputs=document.getElementsByClassName('inputs')
4 for(input of inputs){
5 input.value=' ' ///this emptys the inputs
6 }
7 }
8</script>
9<input class='inputs' type="text">
10<input class='inputs' type="text">
11<input class='inputs' type="text">
12
13<button onclick='clear_inputs()'>Clear</button>