Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

onfocus js

const password = document.querySelector('input[type="password"]');

password.addEventListener('focus', (event) => {
  event.target.style.background = 'pink';
});

password.addEventListener('blur', (event) => {
  event.target.style.background = '';
});
Comment

window onfocus

window.onload = function() { 
    window.onfocus = function() { alert('example'); };
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: match city regex 
Javascript :: How to abreviate digits in js 
Javascript :: nodejs update in mysql 
Javascript :: array json 
Javascript :: change a variable outside a function js 
Javascript :: ReactJS Axios Delete Request Code Example 
Javascript :: min heap javascript 
Javascript :: javascript date format 
Javascript :: how to fetch first 10 characters of a string in node js 
Javascript :: js contain character 
Javascript :: type in javascript 
Javascript :: console javascript 
Javascript :: set localstorage value 
Javascript :: using ejs with express 
Javascript :: expo app loading 
Javascript :: print page using js 
Javascript :: how to replace empty string with undefined 
Javascript :: bun react 
Javascript :: javascript base64 decode 
Javascript :: React tagInput component 
Javascript :: bodyparser express deprecated 
Javascript :: return object list in find js 
Javascript :: javascript for loop array backwards 
Javascript :: babel start command nodejs 
Javascript :: conditional props react 
Javascript :: node convert string to hash 
Javascript :: how to create thumbnail image from video in javascript 
Javascript :: javascript get client page title 
Javascript :: How to make remove buttoon on table using js DOM 
Javascript :: find smallest length string in an array js 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =