Complete MP09
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function customize(option)
|
||||
{
|
||||
switch (option) {
|
||||
case 1:
|
||||
document.getElementById("p1").style.color = "red";
|
||||
document.getElementById("p1").style.fontFamily = "Arial";
|
||||
break;
|
||||
case 2:
|
||||
document.getElementById("p1").style.color = "blue";
|
||||
document.getElementById("p1").style.fontFamily = "Helvetica";
|
||||
break;
|
||||
case 3:
|
||||
document.getElementById("p1").style.color = "purple";
|
||||
document.getElementById("p1").style.fontFamily = "sans-serif";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p id="p1">Hi there!</p>
|
||||
<input type="button" onclick="customize(1)" value="customize 1" />
|
||||
<input type="button" onclick="customize(2)" value="customize 2" />
|
||||
<input type="button" onclick="customize(3)" value="customize 3" />
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user