jquery - JavaScript and iframe style -
i'm working html, css , js make web application.
i have html page iframe (they in same domain) , i'd change iframe's style when click on button.
so, in main page have button
<button class="btn btn-default" onclick="refreshframe()"> <span class="glyphicon glyphicon-refresh"></span> refresh </button>
which, when clicked, calls
function refreshframe() { $("iframe").contents().find(".page-content").css("color", "blue"); }
the problem code seems work. text in page-content div change color seems iframe instantaneously refreshes , color returns black.
can me?
the button submit button. if page refreshes, because button inside form.
you running js, submitting form, reloads page.
add type="button"
js-only button.
Comments
Post a Comment