function getIP() { if (document.getElementById("remoteIp").length > 0) { document.getElementById("remoteIp").value = ''; } } window.onload = getIP;