Introduction:

<script type="text/javascript">
$(function
() {
$('#btnRefresh').click(function () {
$('#testframe').attr('src', $('#testframe').attr('src'));
});
});
</script>
Full source Code for Sample Application:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery Reload iframe</title>
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function
() {
$('#btnRefresh').click(function () {
$('#testframe').attr('src', $('#testframe').attr('src'));
});
});
</script>
</head>
<body>
<div>
<iframe id="testframe"
src="http://www.maziksolutions.com"
width="400px"
height="350px"></iframe><br /><br />
<input type="submit"
name="go"
id="btnRefresh"
value="Refresh
Iframe"/>
</div>
</body>
</html>
0 comments:
Post a Comment