87,922
社区成员
发帖
与我相关
我的任务
分享
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" defer="defer">
!function () {
for (var ts = [], a = [], i = 1 ; i < 65536 ; i ++) {
if (i % 8 == 0) {
a[a.length] = '<td><font color="red">' + i + ' :<\/font> &#' + i + ';</td><\/tr><tr>';
} else {
a[a.length] = '<td><font color="red">' + i + ' :<\/font> &#' + i + ';</td>'
}
if (a.length > 999) {
ts[ts.length] = '<table align="center" border="1"><tr>' + a.join('') + '<\/tr><\/table>'
a.length = 0;
}
}
if (a.length > 0) {
ts[ts.length] = '<table align="center" border="1"><tr>' + a.join('') + '<\/tr><\/table>'
a.length = 0;
}
!function () {
if (ts.length) {
document.body.insertAdjacentHTML('beforeEnd', '<br />' + ts.shift());
window.setTimeout(arguments.callee, 500);
}
}();
}();
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
!function () {
for (var a = [], i = 0 ; i < 65536 ; i ++) {
a[i] = '<font color="red">' + i + ' :<\/font> &#' + i + ';';
}
document.write('<table border="1"><tr><td>', a.join('<\/td><\/tr><tr><td>'), '<\/td><\/tr><\/table>');
}();
</script>
/[^\x00-\xff]/
这个非单字节的不行么??
中文和全角的字符都是非单字节啊...
>或者\/>
什么意思?
/[^\x00-\xff]|\/?>/g
这样?
用正则表达式限制只能输入全角字符: onkeyup="value=value.replace(/[^\uFF00-\uFFFF]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\uFF00-\uFFFF]/g,''))"