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

add increase count function #77

Closed
wants to merge 1 commit into from
Closed
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
33 changes: 33 additions & 0 deletions 001-counter-app/Rasel/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Counter App</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="bg-gray-100 flex items-center justify-center min-h-screen">

<!-- Counter App Container -->
<div class="bg-white shadow-lg rounded-lg p-8 text-center">
<h1 class="text-2xl font-bold text-gray-800 mb-4">Counter App</h1>

<!-- Counter Display -->
<div id="counter" class="text-4xl font-bold text-gray-700">0</div>

<!-- Counter Controls -->
<div class="mt-6">
<button id="Increment"
class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded mr-2">+</button>
<button id="decrement" class="bg-red-500 hover:bg-red-600 text-white font-bold py-2 px-4 rounded ml-2">-</button>
<button id="reset" class="bg-green-500 hover:bg-red-600 text-white flex-col font-bold py-2 px-4 rounded ml-2">Reset</button>
</div>
</div>

<script src="./script.js"></script>
</body>

</html>
34 changes: 34 additions & 0 deletions 001-counter-app/Rasel/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
let count=0;
const counterElement=document.getElementById('counter');
const incrementButton=document.getElementById('Increment');
const resetButton=document.getElementById('reset');
function increaseCount(){
if(count ==10)
{
alert('Overflow');
}
else{
count=count+1;
counterElement.innerText=count;
}
}
incrementButton.addEventListener('click', increaseCount);
function decreaseCount()
{
if(count==0)
{
alert('Count can not be negative');
}
else{
count=count-1;
counterElement.innerText=count;
}
}
function reset(){
count=0;
counterElement.innerText=count;
}
resetButton.addEventListener('click',reset)

const decrementButton=document.getElementById('decrement');
decrementButton.addEventListener('click',decreaseCount );
47 changes: 0 additions & 47 deletions 002-number-comparator/Alamin/index.html

This file was deleted.

52 changes: 0 additions & 52 deletions 002-number-comparator/Alamin/number-comparator.js

This file was deleted.

28 changes: 0 additions & 28 deletions 002-number-comparator/Dipu/index.html

This file was deleted.

47 changes: 0 additions & 47 deletions 002-number-comparator/Dipu/number-comparator.js

This file was deleted.

29 changes: 0 additions & 29 deletions 002-number-comparator/Talha/index.html

This file was deleted.

29 changes: 0 additions & 29 deletions 002-number-comparator/Talha/number-comparator.js

This file was deleted.

28 changes: 0 additions & 28 deletions 002-number-comparator/Tamjid/index.html

This file was deleted.

52 changes: 0 additions & 52 deletions 002-number-comparator/Tamjid/script.js

This file was deleted.

Loading