Retrieving Input Text Value

http://stackoverflow.com/questions/14329908/retrieving-input-text-value/14329950#14329950

by Jeromy French

HTML

<form>
    Enter hash here: <input type="text" name="hash">
       <button type="button">Retrieve Url</button>
</form>

JavaScript

$('button').click(function() {
    $('form').attr('action', '/tasks/'+$('input[type="text"]').val()).submit();
});