Here check out this fiddle - http://jsfiddle.net/WEyyh/152/
I simply took your example and added another input to your form with an id of url.. and when the button is being created I am using the .val() of that input and putting it instead of the # in your anchor
$('#buttonPlaceHolder').append('<a href="' + $('#url').val() + '" data-role="button">'+$('#buttonText').val()+'</a>');
Keep in mind that when you enter something into the input box you should have http:// there because otherwise it will assume it is a local link.. try http://www.google.com
API link for val() - http://api.jquery.com/val/