Ver Fonte

Add html directory example

bel2125 há 7 anos atrás
pai
commit
cda9b71b17
3 ficheiros alterados com 24 adições e 0 exclusões
  1. 17 0
      test/htmldir/index.html
  2. 4 0
      test/htmldir/script.js
  3. 3 0
      test/htmldir/style.css

+ 17 - 0
test/htmldir/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<title>HTML page title</title>		
+		<script type="text/javascript" src="script.js"></script>
+		<link rel="stylesheet" href="style.css" type="text/css" />
+	</head>
+
+	<body onload="onload()">
+		<h1>Head1</h1>
+		<h2>Head2</h2>
+		<p>Body</p>
+		<div id="div1">Script not working</div>
+	</body>
+</html>
+

+ 4 - 0
test/htmldir/script.js

@@ -0,0 +1,4 @@
+
+function onload() {
+	document.getElementById("div1").innerHTML = "script started";
+}

+ 3 - 0
test/htmldir/style.css

@@ -0,0 +1,3 @@
+body { color: red }
+body { background-color: grey }
+