开发者

reset forms inside an iframe from same domain

开发者 https://www.devze.com 2023-03-04 20:16 出处:网络
I am using a 3rd party chat service that makes you use iframe to host your own chat. They allow you to place html and javascript so I was wondering how i can add a button to clear the forms in the \"f

I am using a 3rd party chat service that makes you use iframe to host your own chat. They allow you to place html and javascript so I was wondering how i can add a button to clear the forms in the "formsframe" iframe

main frame

<iframe src="http://www.chat.com/529552/?main" name="mainframe" id="mainframe"></iframe>

forms frame

<iframe src="http://www.chat.com/529552/?forms" name="formframe" id="formfr开发者_运维问答ame"></iframe>

forms names: name, email, message


  $(document).ready(function() {
    $('#formframe').ready(function() {
         $('#formframe').content().find('form').append('<input type="reset" value="Reset" />');
      });
   });
0

精彩评论

暂无评论...
验证码 换一张
取 消