[HTML] 纯文本查看 复制代码 <!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
#fullscreen-input {
width: 100%;
height: 100%;
box-sizing: border-box;
resize: none;
font-size: 18px;
padding: 20px;
}
</style>
<script>
window.onload = function() {
function handleInput(event) {
event.target.value = event.target.value.normalize('NFKC').replace(/⻛/g, '风');
// 在 normalize 之后,使用 replace 方法将特殊的 "⻛" 字符替换为 "风"
}
var inputElement = document.getElementById('fullscreen-input');
inputElement.addEventListener('input', handleInput);
}
</script>
</head>
<body>
<textarea id="fullscreen-input" placeholder="输入文本"></textarea>
</body>
</html>
|