i am trying to make a try it your self like in w3school and i need help. this is where i get so far:
<input value="Update page" type="button">
<textarea id="mycode"></textarea>
<iframe id="display"></iframe>
another tryityourself:
<input value="Update page" type="button">
<textarea id="mycode"></textarea>
<iframe id="display"></iframe>
$(document).ready(function() {
$('input:button').on('click', function() {
var x = $(this).next().val();
frames['display'].document.documentElement.innerHTML = x;
});
});
but what i want is the html will show in the iframe near the closest textarea.
i hope you understand what i mean.
please help me.