Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript-hello #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions html&javascript/mariam.html/mariam.js/helloworld.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello World</title>
</head>
<body>
<div onmouseover="mOver(this)" onmouseout="mOut(this)"
style="background-color:#D94A38;width:120px;height:20px;padding:40px;">
Hello World
</div>
<script src="helloworld.js" ></script>
</body>
</html>
13 changes: 13 additions & 0 deletions html&javascript/mariam.html/mariam.js/helloworld.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function mOver(obj) {
obj.innerHTML = "HELLO WORLD"
let R = [Math.floor(Math.random() * 255) + 1];
let G = [Math.floor(Math.random() * 255) + 1];
let B = [Math.floor(Math.random() * 255) + 1];
const randomNumb = `rgb(${R}, ${G}, ${B})`;
obj.style.backgroundColor = randomNumb;

}

function mOut(obj) {
obj.innerHTML = "Hello world"
}
11 changes: 11 additions & 0 deletions html&javascript/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# PREREQUISITE

1. Have Any one Browser(Chrome,Edge,Brave,Firefox)
[OPTIONAL]
2.Have a Text-Editor Example: Vscode

# RUN

Either Open index.html file in your browser directly to view it or use live server extension in vscode to view it in

NB: You can hover on the hello world to view it in a differnt colour and text.