From 9b171c7c88552786078f730bb4a51968e8180945 Mon Sep 17 00:00:00 2001 From: Afolabi Opeyemi Mariam Date: Tue, 26 Oct 2021 16:46:51 +0100 Subject: [PATCH] javascript-hello --- .../mariam.html/mariam.js/helloworld.html | 16 ++++++++++++++++ .../mariam.html/mariam.js/helloworld.js | 13 +++++++++++++ html&javascript/readme.md | 11 +++++++++++ 3 files changed, 40 insertions(+) create mode 100644 html&javascript/mariam.html/mariam.js/helloworld.html create mode 100644 html&javascript/mariam.html/mariam.js/helloworld.js create mode 100644 html&javascript/readme.md diff --git a/html&javascript/mariam.html/mariam.js/helloworld.html b/html&javascript/mariam.html/mariam.js/helloworld.html new file mode 100644 index 0000000..cb849c1 --- /dev/null +++ b/html&javascript/mariam.html/mariam.js/helloworld.html @@ -0,0 +1,16 @@ + + + + + + + Hello World + + +
+ Hello World +
+ + + \ No newline at end of file diff --git a/html&javascript/mariam.html/mariam.js/helloworld.js b/html&javascript/mariam.html/mariam.js/helloworld.js new file mode 100644 index 0000000..c5ed40b --- /dev/null +++ b/html&javascript/mariam.html/mariam.js/helloworld.js @@ -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" + } \ No newline at end of file diff --git a/html&javascript/readme.md b/html&javascript/readme.md new file mode 100644 index 0000000..9634edb --- /dev/null +++ b/html&javascript/readme.md @@ -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. \ No newline at end of file