Home > Web Front-end > JS Tutorial > How to use iframe tags that comply with W3C web standards_javascript skills

How to use iframe tags that comply with W3C web standards_javascript skills

WBOY
Release: 2016-05-16 19:11:18
Original
1285 people have browsed it

The website wants to be revamped, but there is an advertising problem. In the past, every time an advertisement was placed, I had to update all the articles on the site. This is both inconvenient and bad! Some of the articles previously recommended on the website have been changed to the ones recommended now! And it was a waste of my time. So I want to use Iframe to achieve it, but using iframe directly does not meet the standards. So how can I use it to comply with W3C standards?

Using "IFRAME" directly does not comply with "W3C web standards"

Use JS to standardize iframe.

1. Create a JS file with the following code:

Copy code The code is as follows:

function ifr(url,w,h){document .write('');}

Save as "ifr.js"

2. Insert code into the web page

Copy code The code is as follows:

"
The code is as follows:


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