7 swap
<html>
<head>
<script>
function swapcontent(id1,id2)
{
var tmp=document.f1.id1.value;
document.f1.id1.value=document.f1.id2.value;
document.f1.id2.value=tmp;
}
</script>
<body bgcolor="cyan">
<form name="f1">
<input type="text" name="id1" value="Good"><br><br>
<input type="text" name="id2" value="Bad" ><br><br>
<input type="button" value="CLICK HERE TO SWAP" onclick="swapcontent(id1,id2)"><br>
</form>
</body>
</html>
Comments
Post a Comment