SOURCE

console 命令行工具 X clear

                    
>
console
<script>
/***去除中文函数****/
/***BY TONYLINZHEN****/
function CutChr()
{
var x=document.getElementById("text");
var str=x.value;
while(/[\u4E00-\u9FA5]+/.test(str)){
str=str.replace(/[\u4E00-\u9FA5]+/,"");
x.value=str;
}
}
</script>
<body>
<textarea cols="30" rows="30" id="text"></textarea>
<input type="button" value="提交" onclick="CutChr()"/>
</body>