JavaScript
Article

Getting the Src of an Injected iFrame with jQuery

By Sam Deering

Simple jQuery code snippet to get the src (ie the url) of an injected iframe by simply getting the value of it’s “src” parameter. From here you can access the params in the src.

Also See:

//selector for injected iframe
var iframeSrc = $('#iframe').attr('src');
Sam Deering
Meet the author
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in JavaScript, once a week, for free.