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>
Also in JavaScript:
- stream recording javascript
- clear timeout js
- UltraExploit.js
- node js callback
- material css
- javascript how to check if image exists
- formating decimal hours as hours and minute javascript
- javascript get multiple elements by id
- nodejs fs delete non empty directory
- javascript check if a value is an int
- how to add make touchstart passive in jquery "3.4.0"
- javascript in array
- how to eat beans in javascirpt
- pass params react js
- lodash debounce
- change view port of svg with javascript
- remove attribute javascript
- how to get browser url in javascript
- angular directive example
- jquery get ip
- js unspecified parameters
- js dom ready function
- foeach in js
- sql server import json