반응형
반응형

웹에서 요소 복사. HTML DOM execCommand() Method

현재 선택영역의 텍스트를 인자로 받은 값을 통해 변환시킵니다. 

execCommand 에서 "copy" 명령 사용

document.execCommand('Italic')           // 기울이기
document.execCommand('Underline')        // 밑줄
document.execCommand('StrikeThrough')    // 중간줄
document.execCommand('Cut')              // 자르기
document.execCommand('Copy')             // 복사하기
document.execCommand('Paste')            // 붙혀넣기
document.execCommand('Undo')             // 실행취소
document.execCommand('Redo')             // 다시실행
document.execCommand('insertorderedList')    // 글번호 매기기
document.execCommand('insertunorderdList')   // 글머리 매기기
document.execCommand('outdent')          // 내어쓰기
document.execCommand('indent')           // 들여쓰기
document.execCommand('justifyleft')      // 왼쪽정렬
document.execCommand('justifycenter')    // 가운데정렬
document.execCommand('justifyright')     // 오른쪽정렬

Syntax

document.execCommand(command, showUI, value)

Parameter Values

ValueDescription

command Specifies the name of the command to execute on the selected section. 

Legal values: 
"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"
"superscript"
"undo"
"unlink"
"useCSS"
showUI A Boolean, specifies if the UI should be shown or not
value Some commands need a value to be completed

 

반응형
반응형

web library - petercollingridge Site http://www.petercollingridge.co.uk/tutorials/

 

Tutorials

Explaining how to make fun things because, if nothing else, it helps me understand them.

petercollingridge.co.uk

Tutorials

Home


Explaining how to make fun things because, if nothing else, it helps me understand them.


SVG Tutorials

Collections of SVG tutorials covering the basics to more advanced techniques for making SVGs interactive.

3D Graphics

Building simple 3D engines with Pygame or processing.js.

Pygame physics simulation

Building a simple but versatile physics simulation with Python and Pygame.

Computational geometry

Solving geometry problems for computer graphics.

Inkscape

How to achieve some simple effects in Inkscape.

Bioinformatics

Various tutorials explaining some simple bioinformatics concepts.

Python

Not really a tutorial, but short explanations of various Python things I've learnt.

 

반응형
반응형
점프 투 파이썬
점프 투 파이썬
반응형
반응형
개발자, 나의 현재 위치

반응형
반응형
반응형
반응형

freeCodeCamp Guide

This website is full of articles about all things related to programming. You can use the search bar above to find something you would like to learn about, or use the navigation to explore the content.

There are articles on:

  • SQL
  • Mathematics
  • JavaScript
  • Bootstrap
  • Git
  • and a whole lot more

https://guide.freecodecamp.org/

 

freeCodeCamp Guide

freeCodeCamp Guide This website is full of articles about all things related to programming. You can use the search bar above to find something you would like to learn about, or use the navigation to explore the content. There are articles on: SQLMathemati

guide.freecodecamp.org

 

반응형

'프로그래밍' 카테고리의 다른 글

개발자 구인난이 심각한가?  (0) 2019.08.21
애플에 리젝 받을때의 기분  (0) 2019.07.25
맥북 프로 2019  (0) 2019.06.09
로지텍 M720 무선마우스 M-R0062  (0) 2019.06.03
Top 10 Tech Skills in demand in 2019  (0) 2019.05.20

+ Recent posts