Skip to content

Instantly share code, notes, and snippets.

@sun1shayina
Created February 26, 2018 16:08
Show Gist options
  • Save sun1shayina/5df9438dfe1b82a3bde85109d9802011 to your computer and use it in GitHub Desktop.
Save sun1shayina/5df9438dfe1b82a3bde85109d9802011 to your computer and use it in GitHub Desktop.
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
<!DOCTYPE html>
<html>
<head>
<title>Greet App</title>
</head>
<body>
<h1>greet App</h1>
<!-- Its important to guve your users instructions so they can have an idea of what your pages does. -->
<p>Enter your name and you will be greeted.</p>
<form id="name-form">
<label>First name :</label>
<input type="text" id="fname-input">
<label>Last name</label>
<input type="text" id="lname-input">
<button type="submit">Enter</button>
</form>
<p id="output-p"></p>
<p>Please insert your firstname and your lastname</p>
<script type="text/javascript" src="scripts.js"></script>
<a href=""></a>
<link rel="stylesheet" type="text/css" href="scripts.css">
<table border="solid black">
<thead>
<tr>
<th>Ethnicity</th>
<th>Weight</th>
</tr>
</thead>
<tr>
<td>African American</td>
<td>103Kg</td>
</tr>
</table>
</body>
</html>
'use strict';
var nameForm = document.getElementById('name-form');
nameForm.addEventListener('submit',function(){
// alert('hi');
event.preventDefault();
var fnameInput = document.getElementById('fname-input');
var LnameInput = document.getElementById('lname-input');
var output = document.getElementById('output-p');
output.innerHTML = 'Welcome Home '
// fnameInput.value +''+ LnameInput.value;
});
console.log(nameForm);
@hkinke
Copy link

hkinke commented Mar 6, 2018

The extensions of yours files have mistakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment