[CODE]<html>
<head>
<script language="javascript">
function aaa(val)
{
var a=val.toString();
var b="";
for(i=a.length-1;i>=0;i--)
{
b=b.concat(a.substr(i,1));
}
alert(b);
return parseInt(b);
}
</script>
</head>
<body>
<input type="text" id="aa">
<input type="button" value="change" onclick="aaa(document.all.aa.value);">
</body>
</html>[/CODE]