Change Font Size and Color of text using Java Script

-- 1 comment
Change the font size and color of the text using java script We use onmouseover in this example code. You can use onClick and onmouseout too.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<html>
<head>
 <title>Display a table</title>
</head>
<body>
 <p id="Hello" onmouseover="change(this)">Hello How are you doing</p>
 <script>
 function change(obj){
  obj.style.margin = "90px";
  obj.style.fontSize = obj.style.fontSize == "200%" ? "300%" : "200%";
  obj.style.color= obj.style.color=="green" ? "red" : "green"; 
 }
 </script>
</body>
</html>


Hello This is Sagar Devkota. Studying Bachelor of Software Engineering at Pokhara University. I know something about Linux, Android, Java, Nodejs, Unity3D and 3 dots :)

1 comment: Leave Your Comments

  1. Furthermore, want to} look out for on line casino games that contribute the very best share towards of|in direction of} the bonuses and examine them out. Casino bonus VIP packages come in different varieties depending on the on line casino. Typically, every online on line casino decides how they wish to reward loyal gamers by designing 1xbet their VIP packages. While the no deposit bonus is usually restricted to a couple times, a reload bonus is not. If may be} unsure whether or not you met the wagering requirements or not, have the ability to|you possibly can} contact customer help. How much precise bonus worth every on line casino offers you on a $100 deposit.

    ReplyDelete