<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