==================================================== ======================
JavaScript:
function submit_button(){ var btn=document.getElementById(button_id'); btn.setAttribute('type', 'submit'); }
==================================================== ======================
Jquery:
function submit_button(){ $('#' + button_id).prop('type', 'submit'); }
==================================================== ======================
he works here .....
source share