如何实现textbox.text的内容颠倒顺序
如何实现textbox.text的内容颠倒顺序
------解决方案-------------------- <script>
function orderText(inputBox)
{
var obj = inputBox.value;
var outTxt;
if(obj.length> 0)
{
outTxt = " ";
for(var i=obj.length-1; i> =0; i--)
{
outTxt += obj.charAt(i);
}
inputBox.value=outTxt;
}
}
</script>
<input type= "text " id= "input1 " onblur= "orderText(this); " />
<input type= "text " id= "input2 " onblur= "orderText(input1); " />