<form onsubmit="return false"> <input type="text" id="text" /> <input type="submit" id="submit" onclick="search()" /> </form>