Wednesday, 20 August 2014

button java

<html>

<title>java script</title>
<script>
function abc()
{
document.getElementById("check").align="left";}

function abc1()
{
document.getElementById("check").align="center";}

function abc2()
{
document.getElementById("check").align="right";}
function abc3()
{
document.getElementById("check1").color="red";}
function abc4()
{
document.getElementById("check1").color="blue";}
function abc5()
{
document.getElementById("check1").color="pink";}


</script>

</head>

<body>
<h1 id="check"><font id="check1">java script</font></h1>
<button onClick="abc()">left</button>
<button onClick="abc1()">center</button>
<button onClick="abc2()">right</button>
<button onClick="abc3()">red</button>
<button onClick="abc4()">blue</button>
<button onClick="abc5()">pink</button>

</body>
</html>

No comments:

Post a Comment