Home > Web Front-end > JS Tutorial > body text

js method to change Src in Iframe_javascript skills

WBOY
Release: 2016-05-16 16:00:57
Original
1230 people have browsed it

The example in this article describes the method of changing Src in Iframe using js. Share it with everyone for your reference. The specific implementation method is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" 
content="http://schemas.microsoft.com/intellisense/ie5">
<script type="text/javascript">
function test(Url)
{
document.frames[0].location.href =Url; 
}
</script>
</head>
<body>
<iframe id="xx" src=""></iframe>
<a onclick="test('top.html')" href="#">linkbutton</a>
</body>
</html>
Copy after login

I hope this article will be helpful to everyone’s JavaScript programming design.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template