document.getElementById('url').onsubmit = function() { var tmp = this.target, t = tmp.split(/ ?/); for(var i in t) { this.target = t[i]; this.submit(); } this.target = tmp; return false; }