HTML DOM Document execCommand() పద్ధతి

నిర్వచనం మరియు వినియోగం

execCommand() మార్గదర్శకం ఉంది. దానిని వాడకూడదు.

applet అంశం అన్ని కొత్త బ్రౌజర్లలో ఖాళీగా వారుదల చేస్తుంది HTMLCollection

HTML5 అన్ని కొత్త బ్రౌజర్లలో <applet> అంశాన్ని మద్దతు ఇవ్వకుండా ఉంటుంది。

ప్రత్యామ్నాయం:

Document designMode అంశం

Element contentEditable అంశం

ఉదాహరణ

ఎంపికచేసిన టెక్స్ట్ ను బోల్డ్ చేయండి:

document.execCommand("bold");

స్వయంగా ప్రయత్నించండి

వినియోగం

document.execCommand(command, showUI, విలువ)

పరిమితి

పరిమితి వివరణ
command

అమలు చేయాల్సిన ఆదేశం యొక్క పేరు:

  • "backColor"
  • "bold"
  • "createLink"
  • "copy"
  • "cut"
  • "defaultParagraphSeparator"
  • "delete"
  • "fontName"
  • "fontSize"
  • "foreColor"
  • "formatBlock"
  • "forwardDelete"
  • "insertHorizontalRule"
  • "insertHTML"
  • "insertImage"
  • "insertLineBreak"
  • "insertOrderedList"
  • "insertParagraph"
  • "insertText"
  • "insertUnorderedList"
  • "justifyCenter"
  • "justifyFull"
  • "justifyLeft"
  • "justifyRight"
  • "outdent"
  • "paste"
  • "redo"
  • "selectAll"
  • "strikethrough"
  • "styleWithCss"
  • "subscript"
  • "superscript"
  • "undo"
  • "unlink"
  • "useCSS"
showUI బుల్ విలువ. యూఐ ని చూపించాలా అని నిర్దేశిస్తుంది.
విలువ కొన్ని ఆదేశాలు పూర్తి కోసం విలువలను అవసరం చేసుకుంటాయి。

పునఃవారుదల విలువ

రకం వివరణ
బుల్ విలువ ఆదేశాన్ని మద్దతు ఇస్తే ఈము ట్రూ అవుతుంది మరియు లేకపోతే ఫాల్స్ అవుతుంది。