웹페이지에서 클립보드 다루기

Website 세상/Web Program 2008. 10. 22.
웹페이지에서 클립보드 다루기

window.clipboardData.getData("Text");
bResult = window.clipboardData.setData("Text",oSource.innerText);

Method Description
clearData Removes one or more data formats from
the clipboard through dataTransfer or clipboardData object.
getData Retrieves the data in the specified format from
the clipboard through the dataTransfer or clipboardData objects.
setData Assigns data in a specified format to
the dataTransfer or clipboardData object.

bSuccess = object.setData(sDataFormat, sData)
sDataFormat:
Required. String that specifies the format of the data to be transferred, using one of the following values: Text Transfers data formatted as text.
URL Transfers data formatted as a URL.

sData:
Required. String that specifies the data supplied by the source object. This information can be descriptive text, a source path to an image, or a URL for an anchor. When you pass "URL" as the sDataFormat parameter, you must use the sData parameter to provide the location of the object being transferred.

어떤 자료가 있을때 클립보드로 복사해서 엑셀같은데 붙여넣기하면 좋다.
엑셀에 넣을때 필드 구분은 \t 레코드 구분은 \n 이다 


웹페이지에서 클립보드 다루기 - IT감리, IT컨설팅, 웹컨설팅, 웹에이전시, 웹솔루션개발, ERP, SCM, CRM, ToTb, 홈페이지제작, 웹사이트 제작, 온라인 마케팅, 시스템구축, 유지보수, 운영대행 등
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 라이프코리아트위터 공유하기
  • shared
  • 카카오스토리 공유하기