<script>
 function CssFnctn()
    {
      document.execCommand('formatblock', false, 'p')
      var listId = window.getSelection().focusNode.parentNode;
      $(listId).addClass("oder2");
     }
</script>

参考

http://stackoverflow.com/questions/23380628/how-to-add-class-or-id-or-css-style-in-execcommand-formatblock-p-tag

 

相关文章:

  • 2021-07-31
  • 2021-07-20
  • 2022-03-14
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案