Skip to Main Content
JavaScript - Schritt für Schritt
book

JavaScript - Schritt für Schritt

by Steve Suehring
May 2011
Intermediate to advanced content levelIntermediate to advanced
480 pages
17h 59m
German
Microsoft Press Deutschland
Content preview from JavaScript - Schritt für Schritt
232
Kapitel 10: Das Dokumentobjektmodell
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Attribut festlegen</title>
</head>
<body>
<a href="http://www.braingia.org" id="braingialink">Steve Suehring's Web Site</a>
<script type="text/javascript">
var a1 = document.getElementById("braingialink");
alert(a1.getAttribute("href"));
a1.setAttribute("href","http://www.microsoft.com");
alert(a1.getAttribute("href"));
</script>
</body>
</html>
Wenn Sie diese Seite in einem Webbrowser öffnen, erscheint ein alert()-Dialogfeld, das den aktuellen Wert
des href-Attributs anzeigt (siehe ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Script: Das umfassende Referenzwerk

Java Script: Das umfassende Referenzwerk

David Flanagan

Publisher Resources

ISBN: 9783848320417Purchase bookSupplemental Content