HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Text Modifier</title>
<style type="text/css"><!--
body { font-family:Arial, Helvetica, sans-serif; }
--></style>
<script type="text/javascript"><!--
function convert(string) {
var result="";
for(i=0;i<string.length;i++) {
i%2==0?result+=string.charAt(i).toUpperCase():result+=string.charAt(i).toLowerCase();
}
document.getElementById("output").value=result;
}
//--></script>
</head>
<body>
<h3><u>Text Modifier</u></h3>
<p>Enter text:</p>
<p>
<input type="text" name="input" id="input" style="width:600px;" onkeyup="convert(this.value);" />
</p>
<p>Output:</p>
<p>
<input type="text" name="output" id="output" style="width:600px;" readonly="readonly" />
</p>
</body>
</html>
Bookmarks