by Abdul Bashet.
In some case I like not to use mform. So I can create my form by using html_writer() like below:
$content ='';
$content .= ''//other elemnt of this form
$content .= html_writer::empty_tag('input',array('type'=>'button', 'name'=>'Upload', 'value'=>'Upload', 'onclick'=>MyFunction()));