I can not understand the reason. Here is the code, the most elementary. When outputting (both through the server and without it), neither the text “Something is already written” is seen, nor what I want to add.

<script type="text/javascript"> $(document).ready(function(){ $("#addcols" ).click(function(){ $("iframe#frm").contents().append("ffff"); }); }); </script> </head> <body> <input type="submit" id="addcols" /> <iframe id="frm"> Что-то уже написано </iframe> </body> </html> 

    1 answer 1

    Because the content of the iframe tag is displayed only when this tag is not supported. That is, never for all browsers that can be discussed now.

    • so how do i fix it then? - Kostya
    • @ Kostya, replace the iframe with a div ? - Qwertiy
    • the stupidity of life, that too. For some reason I decided to work through the iframe. now everything works - Kostya
    • @ Kostya, accept the answer (click on the green check mark on the left). - Qwertiy