Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

addeve

document.querySelector('.check').addEventListener('click', function () {
  const guess = Number(document.querySelector('.guess').value);
  console.log(guess, typeof guess);

})
Comment

addeve

 <section class="left">
        <input type="number" class="guess" />
        <button class="btn check">Check!</button>
      </section>
Comment

addeve

.guess {
  background: none;
  border: 4px solid #eee;
  font-family: inherit;
  color: inherit;
  font-size: 5rem;
  padding: 2.5rem;
  width: 25rem;
  text-align: center;
  display: block;
  margin-bottom: 3rem;
}
.btn {
  border: none;
  background-color: #eee;
  color: #222;
  font-size: 2rem;
  font-family: inherit;
  padding: 2rem 3rem;
  cursor: pointer;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: deep copy array of objects javascript 
Javascript :: express.js routing 
Javascript :: añadir input file a formdata javascript 
Javascript :: menu with dynamic submenu in javascript 
Javascript :: access data from dofferent file in js 
Javascript :: deletenode javascript 
Javascript :: react-bootstrap-sweetalert is not running 
Javascript :: limpiar historial angular 
Javascript :: translate javascript to english 
Javascript :: react Examples of correct cod 
Javascript :: add function 
Javascript :: how-can-i-implement-joi-password-complexity-in-joi-validation 
Javascript :: svelte function at interval 
Javascript :: wast node 
Javascript :: command for importing fetchgraphqlquery in nextjs 
Javascript :: return the remainder from two numbers javascript 
Javascript :: folder array randomizer 
Javascript :: Javascript - Dependency between arguments of partial applications 
Javascript :: getting xml from response, make sure server returns valid xml and the "content-type" header is set 
Javascript :: AngularJs: How to interpolate an interpolated string 
Javascript :: Easy Angular way to detect if element is in viewport on scroll 
Javascript :: I am getting an error "createSpyObj requires a non-empty array" with running unit tests, which were executed perfectly before 
Javascript :: react-native installation error with npx react-native 
Javascript :: settimeout and create directory nodejs 
Javascript :: Special Chars like DOTS in Express.js route 
Javascript :: filter number from string in javascript 
Javascript :: slow down an action or event 
Javascript :: Example: How to use || operator to shorten the code. 
Javascript :: Executing Code When Instance Is Created 
Javascript :: map sord elo 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =