- sCommand詳細參數請參考: http://msdn.microsoft.com/en-us/library/ms533049(v=vs.85).aspx.
- bUserInterface:(Optional)是否要顯示UI,如果需填值的sCommand不顯示UI時,vValue必須提供所需值.
- vValue:(Optional)對應sCommand所需值.
範例:
- 前景色: document.execCommand('ForeColor',false,'#ff0000');
- 背景色: document.execCommand('BackColor',false,'#ff0000');
- 文字剪下: document.execCommand('Cut');
- 文字複製: document.execCommand('Copy');
- 文字貼上: document.execCommand('Paste');
- 對齊左: document.execCommand('justifyleft');
- 對齊中: document.execCommand('justifyleft');
- 對齊右: document.execCommand('justifyleft');
- 等寬對齊: document.execCommand('justifyFull');
- 粗體字: document.execCommand('bold');
- 斜體字: document.execCommand('italic');
- 底線: document.execCommand('underline');
- 刪除線: document.execCommand('strikethrough');
- 變更字型: document.execCommand('fontname');
- 變更大小: document.execCommand('fontsize');
- 右縮: document.execCommand('indent');
- 左縮: document.execCommand('outdent');
- 編號: document.execCommand('orderedlist');
- 標號: document.execCommand('unorderedlist');
- 建立連結: document.execCommand('createlink');
沒有留言:
張貼留言