Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<a id="link" tabindex="1" onmousedown="return VerifyHref(this, event, '1', 'SharePoint.OpenDocuments.3', '');return false;" onclick="DispDocItemExWithServerRedirect(this, event, 'FALSE', 'FALSE', 'FALSE', 'SharePoint.OpenDocuments.3', '1', '');return false;" href="/sites/ds/SK/Lists/reest_defects/Attachments/14/image.jpg" style="display: none;">image.jpg</a>
</body>
</html>
 
var a = document.querySelector("#link"),
    href = a.getAttribute("href");
alert(href);
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers