මෙන්න ඔය ගොල්ලන්ට වැදගත් වෙන පොස්ට් එකක් - Vishwakoshaya

රේඩියෝ මතක

gif maker

Breaking

මතක රේඩියෝ

gif maker

Scores

Cricket Score Updater

Live Cricket Score

Runs

0

Wickets

0

Overs

0.0

// Variables to track score let totalRuns = 0; let totalWickets = 0; let balls = 0; // HTML Elements const runsDisplay = document.getElementById('runs-display'); const wicketsDisplay = document.getElementById('wickets-display'); const oversDisplay = document.getElementById('overs-display'); const ballUpdates = document.getElementById('ball-updates'); // Add runs for a ball function addBall() { const runs = parseInt(document.getElementById('runs').value) || 0; // Validate input if (runs < 0 || runs > 6) { alert('Please enter a valid number of runs (0-6).'); return; } totalRuns += runs; balls++; // Calculate overs const overs = Math.floor(balls / 6); const ballInOver = balls % 6; // Update the display runsDisplay.textContent = totalRuns; oversDisplay.textContent = `${overs}.${ballInOver}`; // Add ball update const update = document.createElement('li'); update.textContent = `Ball ${balls}: ${runs} runs`; ballUpdates.appendChild(update); // Clear input document.getElementById('runs').value = ''; } // Add a wicket function addWicket() { if (totalWickets < 10) { totalWickets++; balls++; // Calculate overs const overs = Math.floor(balls / 6); const ballInOver = balls % 6; // Update the display wicketsDisplay.textContent = totalWickets; oversDisplay.textContent = `${overs}.${ballInOver}`; // Add ball update const update = document.createElement('li'); update.textContent = `Ball ${balls}: WICKET!`; ballUpdates.appendChild(update); } else { alert('All wickets are down!'); } }

Jun 18, 2017

මෙන්න ඔය ගොල්ලන්ට වැදගත් වෙන පොස්ට් එකක්


මේක google පාවිච්චිකරන අයට ගොඩක් වැදාගත් වන පොස්ට් එකක්.අපි සාමාන්‍යයෙන් google.com කියල ගැහුවට එන්නේ google.lk කියලනේ එත් අපිට google.com පාවිචිකරන්න්න පොඩික්‍රමයක් තියෙනවා.ඒකතමයි google.com පිටිපස්සට .pg කියල ගහල බලන්න එතකොට google.com පාවිචිකරන්න්න.www.google.com.pg 


No comments: