When you use whenReady, you don't need to know the form ID. It fires for every form on the page, and it's guaranteed to fire when the form is in the DOM and ready for special JS tricks.
var formEl = form.getFormElem(); // formEl is the native DOM element #mktoForm_*, unwrapped from the jQuery (ugh) object
The only way other than using the MktoForms2 events would be DOM Mutation Events. But I don't know why that'd be necessary.
Thank you for your reply.
I am not a js expert, how can I custmize?
The script is below.
<script>MktoForms2.loadForm("//app-ab00.marketo.com", "000-MMM-000", 0000);</script>