Home Javascript do something before alert
Reply: 0

Javascript do something before alert

user291 Published in May 21, 2018, 9:06 am

I want to change the color and alert a message when a button is clicked.

function colorChange() {
  document.getElementById('word').style.color = "red";
  alert("color changed!");

I cannot change the color at the same time with an alert.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.403801 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO