/    Sign up×
Community /Pin to ProfileBookmark

Write a dynamic iframe

Hi,

I wonder if the following is coded correctly:

[CODE]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<title>Sample Page</title>
</head>
<body>
<div id=”container”></div>
<script type=”text/javascript”>
var url = “http://www.example.com/”;
var content = “<iframe width=’800′ height=’600′ frameborder=’0′ src='” + url + “‘></iframe>”;
document.getElementById(“container”).innerHTML = content;
</script>
</body>
</html>[/CODE]

Many thanks in advance!
Mike

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Rain_Lover spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...