I have this code that calls a function on key up but I don't want it to be called so often because if you enter a domain name keyup is triggered very often, so I made a submit button but I don't know how I can call the function with the value of the first input tag.. I did that with this.value first but that probably won't work on the other element. Thanks for any help
<form>
Hostname: <input type="text" id="input" onkeyup="ping(this.value)">
<input type="submit">
</form>