Skip to content

Commit

Permalink
Merge pull request #807 from BrightSkyz/patch-2
Browse files Browse the repository at this point in the history
Fix up JavaScript
  • Loading branch information
ambujraj authored Oct 12, 2018
2 parents 2087335 + a4db975 commit 9ca0dc8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
5 changes: 2 additions & 3 deletions html/bootstrapsimple.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<link rel="stylesheet" href="./style.css">

<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

Expand Down Expand Up @@ -41,6 +39,7 @@ <h3>Simple Hello world with bootstrap</h3>
<footer class="container-fluid bg-4 text-center">
<p>Feito por Raul Ravenclaw</p>
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
16 changes: 8 additions & 8 deletions html/helloworld_changingcolors.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<html>
<head>
<title>Change Color</title>
<script type="text/javascript">
function changeColor() {
var colors=['red','green','blue','brown','orange'];
var index = Math.floor(Math.random() * 5);
var newColor=colors[index];
document.body.style.backgroundColor=newColor;
}
</script>
</head>
<body onload="changeColor()">
<div style="margin-top: 300px;">
Expand All @@ -11,11 +19,3 @@ <h1 style="color: white">Hello World</h1>
</div>
</body>
</html>
<script type="text/javascript">
function changeColor() {
var colors=['red','green','blue','brown','orange'];
var index = Math.floor(Math.random() * 5);
var newColor=colors[index];
document.body.style.backgroundColor=newColor;
}
</script>
7 changes: 1 addition & 6 deletions html/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
<h1>Hello world</h1>
<br>
<h3 id="a" style="text-align: center;color: blue;">Click Me!!</h3>
<button onclick="alertme()">Click Here!!</button>
<script>
function alertme(){
document.getElementById("a").innerHTML = "What's Up!!!";
}
</script>
<button onclick="function(){document.getElementById('a').innerHTML = 'What's Up!!!';}">Click Here!!</button>
</body>
</html>
2 changes: 1 addition & 1 deletion html/hw2018.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Home</title>
<script type="text/javascript">
function welcome() {
alert("This is the year of dog.")
alert("This is the year of dog.");
}
</script>
</head>
Expand Down

0 comments on commit 9ca0dc8

Please sign in to comment.