Change iframe content within an element
- by user610983
$(document).ready(function () {
$('#keywordframe').contents().find("#step12").html('');
$('#keywordframe').contents().find("#step12").html('11');
$('#keywordframe').contents().find("#step13").html('');
$('#keywordframe').contents().find("#step13").html('12');
$('#keywordframe').contents().find("#step14").html('');
$('#keywordframe').contents().find("#step14").html('13');
$('#keywordframe').contents().find("#step15").html('');
$('#keywordframe').contents().find("#step15").html('14');
});
I try to use the above code to change the content in an iframe, but it is not working. Unless I put alert(''); on top of $('#keywordframe').contents().find("#step12").html('');
if just will take effect. What is the reason for that, anyone could help?