javascript change color
<!DOCTYPE html>
<html>
<head>
<script>
function display()
{
var col=document.getElementById("demo");
col.style.color="#FF0000";
}
</script>
</head>
<body>
<h1>My First JavaScript</h1>
<p id="demo">click on the button below.....</p>
<button onclick="display()">Display</button>
</body>
</html>var span = document.getElementsByTagName("span")[0];
span.style.color = "red";
Also in JavaScript:
- lodash find object in array
- how to get all elements with same class in javascript
- how to initialize empty javascript object
- javascript promise
- recorrer letra por letra js
- classname toggle js
- connect mongo to express api
- create server and connect to db and frontend
- email id validation in javascript
- generate component with module angular 8
- how to get selected list item value in javascript
- count word and space in text javascript
- js fill string with n characters
- how to use function in javascript
- angular maxlength directive input type number
- array.unshift in javascript
- create angular project cli version 8
- function click anywhere javascript
- react map wait axios call
- javascript how to sort variables by user input
- firestore batch add array
- javascript on keypu
- how to see my timezone using js
- javascript onsubmit change input value