What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-25 05:40:33
javascript trigger button click using class name
//The following code assumes that the given element has both of those classes; document.querySelector('.rateRecipe.btns-one-small').click(); //In the following code, the space is meant to imply an ancestor-descendant relationship document.querySelector('... Add solution -
Javascript 2022-01-23 01:42:00
javascript style
var elem = document.querySelector('#some-element'); // Set color to purple elem.style.color = 'purple'; // Set the background color to a light gray elem.style.backgroundColor = '#e5e5e5'; // Set the height to 150px elem.style.height = '150px'; Add solution