How to run JS code after form Iframe loaded and pl

2019-03-03 07:40发布

问题:

http://dev.uniteconferencing.com/conference-account-sign-free/?pcode=25u50PT I am trying to get pcode value from url and place into IFRAME form i get the value with this code

jQuery(function(){
      var pcode = location.href;
      var pcode = pcode.split('=');
      var pcode = pcode[pcode.length - 1];
      console.log(pcode);

}); 

but when i try to place this value in form promo code field here http://prntscr.com/dftezo i am unable to place this value because this form loads after every thing loads. I tried my best using on load, bind but still not completed. please help. i am stuck in it from 2 days. Thanks