Trying Out JavaScript
→ 日本語版を読むWhile studying cross-site scripting, JavaScript came up, so I looked into the basics of JavaScript.
JavaScript is a programming language commonly used to create dynamic web pages. With JavaScript, you can display popup windows, slideshows, and more on web pages. The well-known Google Maps allows you to freely navigate using a mouse pointer on a web page — this too is a feature made possible by JavaScript.
You write JavaScript inside <script> tags. For example, write index.html as follows.
You can write it directly inside <script>, or you can load it from a .js file.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>JavaScript テスト</title>
</head>
<body>
<script>
document.write("<p>JavaScriptのテスト</p>");
</script>
<script src="./test.js"></script>
</body>
</html>
Source: JavaScript | Writing JavaScript in an HTML Page | Let's Programming
DOM stands for Document Object Model. By working with the structure of an HTML document, you can access each element of the document (retrieve values and lists).