var asubmit = document.getElementById("submit");
asubmit.setAttribute("onclick","alert('Please check mobile phone number');"); //valid in Firefox, but invalid in IE
asubmit.setAttribute("onclick","javascript:document.buyform.submit();"); //valid in IE, also valid in Firefox