[最佳答案] If it's about disturbing the page design when redisplaying the user's input and if the input is "inappropriate" then apply a CSS style to cut it off by using overflow:hidden. <style> .fixed { overflow:hidden; } </style> Then apply it to the div or container: <div class="fixed" style="width:100px">The following input is really long and invalid. ffffffffffffffffffffffffffffffffffffffffffffffffj