HTML and CSS Reference
In-Depth Information
<html lang="en">
<head>
<meta http-equiv="content-type"
content="text/html; charset=utf-8">
<title>Chapp JavaScript Chat</title>
<link type="text/css" rel="stylesheet"
media="screen, projection" href="css/chapp.css">
</head>
<body>
<h1>Chapp JavaScript Chat</h1>
<form id="userForm">
<fieldset>
<label for="name">Name:</label>
<input type="text" name="name" id="name"
autocomplete="off">
<input type="submit" value="Join">
</fieldset>
</form>
<script type="text/javascript"
src="js/function.js"></script>
<script type="text/javascript"
src="js/object.js"></script>
<script type="text/javascript" src="js/tdd.js"></script>
<script type="text/javascript"
src="js/observable.js"></script>
<script type="text/javascript"
src="js/user_form_controller.js"></script>
<script type="text/javascript"
src="js/chat_client.js"></script>
</body>
</html>
Save the very simple stylesheet in Listing 15.40 in public/css/chapp.css .
Listing 15.40 The initial CSS file
form { display: none; }
.js-chat { display: block; }
Finally, save the bootstrapping script in Listing 15.41 in
public/js/chat _ client.js .
Listing 15.41 The initial bootstrap script
(function () {
if (typeof tddjs == "undefined" ||
typeof document == "undefined"
||
||
||
!document.getElementById
!Object.create
 
Search WWH ::




Custom Search