var theForm = document.getElementById('theForm');
var theInput = document.getElementById('subj');

theForm.onsubmit = function(e) {
    location = "http://jsfiddle.net/maniator/K3D2v/show/#" + encodeURIComponent(theInput.value);
    return false;
}
<form id="theForm">
    <input id='subj'/>
    <input type='submit'/>
</form>