You can use the methods below:
var div = document.GetElementByClass("name");
var link = div.href;
Or:
var iframe = document.GetElementById("targetid");
var link = iframe.src;
More Related Contents:
- What is a clearfix?
- How to overlay images
- How to get the file path from HTML input form in Firefox 3
- Absolutely positioned flex item is not removed from the normal flow in IE11
- Does form data still transfer if the input tag has no name?
- Why does the html input with type “number” allow the letter ‘e’ to be entered in the field?
- Font Awesome icon in select option
- how to make a whole row in a table clickable as a link?
- Provide an image for WhatsApp link sharing
- Determine a user’s timezone
- Grid areas not laying out properly in CSS Grid
- Centering a div block without the width
- How can I print background images in FF or IE?
- What’s the best way to set a single pixel in an HTML5 canvas?
- Margin while printing html page
- CSS Transition – eases in but doesn’t ease out?
- CSS image resize percentage of itself?
- HTML image not showing in Gmail
- HTML radio buttons allowing multiple selections
- Using local file for Web Audio API in Javascript
- Fixed Header, Footer, and Sidebars with scrolling content area in center
- Is there a way to tell browsers to honor the jpeg exif orientation?
- HTML5 Canvas background image
- Forms with action=””
- HTML Input is not updating value attribute on change
- How to get rid of x and up/down arrow elements of a input date?
- HTML CSS Invisible Button
- Clear Canvas Rect (but keep background)
- CSS After Element to insert mailto link?
- Which browsers support data URIs and since which version?