<script type="text/javascript">
function myFormFn(a,b) {
var form = document.getElementById(a);
var input = document.getElementById(b);
input.value = ''+38+input.value;
//form.submit();
}
</script>
<form id="my_form">
<input type="text" id="phone" name="phone" value="">
</form>
<input type="button" value="Отправить" onclick="myFormFn('my_form','phone')">