Search
 
SCRIPT & CODE EXAMPLE
 

HTML

js set iframe src

<script type="text/javascript">
function iframeDidLoad() {
    alert('Done');
}

function newSite() {
    var sites = ['http://getprismatic.com',
                 'http://gizmodo.com/',
                 'http://lifehacker.com/']

    document.getElementById('myIframe').src = sites[Math.floor(Math.random() * sites.length)];
}    
</script>
<input type="button" value="Change site" onClick="newSite()" />
<iframe id="myIframe" src="http://getprismatic.com/" onLoad="iframeDidLoad();"></iframe>
Comment

PREVIOUS NEXT
Code Example
Html :: data-parsley confirm password 
Html :: modpagespeed off htaccess 
Html :: icon not shwing in goole search 
Html :: How to add link on bar for google bar chart 
Html :: rmarkdown revealjs_presentation remove black border to images 
Html :: bootstrap 5 natification 
Html :: axios retreaving index.html code 
Html :: ngb-tab html content 
Html :: EgQSovLEGMb3spAGIhBB1Si11KUheY5Knc9YT5LMMgFy 
Html :: html button ondrag 
Html :: how to toggle hover display text of button on click 
Html :: how sat drop down list in bootstrap 4 like a row and column 
Html :: idisposable .net core 
Html :: 1 aed in rupees 
Html :: simplexml load file character encoding url 
Html :: visual studio code black mode off 
Html :: bootstrap 4 label label-success 
Html :: location nearby html 
Html :: iam making a disable button , when I click on it disable it and the write please wait on this button in jQuery 
Html :: rainbow hr html 
Html :: w3 
Html :: gambar internal html 
Html :: kodingan menambahkan judul isi di html 
Html :: Adding multiple audio content in HTML5 
Html :: file type input limit in html 
Html :: send html email from outlook 
Html :: default index.html code reac 
Html :: hex code html 
Css :: css roboto font 
Css :: css position absolute middle 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =