Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Remove a class when the backspace-key is pressed inside the input field

document.addEventListener("keydown", function (event) {
    if (event.key == "Backspace") {
        console.log("Backspace Pressed");
        var plainlist = document.querySelectorAll('li.red');
        console.log(plainlist);
        plainlist.forEach(item => {
            item.classList.remove("red");

        })
    }
})
Comment

Remove a class when the backspace-key is pressed inside the input field

document.addEventListener("keydown", function (event) {
    if (event.key == "Backspace") {
        console.log("Backspace Pressed");
        var plainlist = document.querySelectorAll('li.red');
        console.log(plainlist);
        plainlist.forEach(item => {
            item.classList.remove("red");

        })
    }
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: react-map-multidimensional-array 
Javascript :: bootstrapMaterialDatePicker min date depends on other field value 
Javascript :: React Rendering Movies 
Javascript :: jsmodule not installed vuejs webstorm 
Javascript :: how to set particle js not hovering over contents 
Javascript :: create json object with multiple arrays 
Javascript :: flatpicker not focusing in modal React 
Javascript :: $("#right-button").click(function() { event.preventDefault(); $(".table-responsive").animate( { scrollLeft: "+=300px" }, "slow" ); }); 
Javascript :: javascript create new array with default values by one line 
Javascript :: how to define array in react js 
Javascript :: can you push more than one item javascript 
Javascript :: mongoose post new document 
Javascript :: jq query online tutorial 
Javascript :: dynamically fill bootstrap card 
Javascript :: syntax error unexpected number in js 
Javascript :: javascript make variable 
Javascript :: show tempdata in javascript 
Javascript :: moment iso string to zero 
Javascript :: how create a random enum on postman variable 
Javascript :: javascript loop through array of objects es6 
Javascript :: how to make console log hello in discord.js 
Javascript :: Admobs For Ios 
Javascript :: print each word in a string javascript 
Javascript :: graphql get item by id from strapi react 
Javascript :: implict type coercion in js 
Javascript :: complicated reduce 
Javascript :: combine strings in angularjs 
Javascript :: json serializable snake case 
Javascript :: javascript keyup original src element 
Javascript :: how to get length of number in javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =