对于支持HTML5浏览器有2种方法:

1. HTML5

<div contenteditable="plaintext-only"></div>

 

2.  CSS3

user-modify: read-write-plaintext-only;   -webkit-user-modify: read-write-plaintext-only



非HTML5浏览器,参考以下JS

总结参考:http://www.cnblogs.com/sheshou/p/5416885.html

 

 

.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-06-15
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-24
  • 2021-12-19
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案