Can we add Alert in WP Plugin Delete Button ?

I want to know this is right method or not in WP Plugin Delete Button inside a form

submit_button( ‘Delete’, ‘del’, ‘submit’, false, array(
‘onclick’ => ‘return confirm("Are you sure you want to delete this ? ");’
Or any other method to do.
Any help will be appreciated.
@FWDesign @mgscoder

It sounds about right.

seems the right one although if it didn’t worked then you can update or switch to the other method for adding alert in wp delete button

thank you