sitelink1 | |
---|---|
sitelink2 | |
sitelink3 | |
sitelink4 | |
extra_vars4 | |
extra_vars5 | |
extra_vars6 |
Syntax
object.insertAdjacentHTML(sWhere, sText)
Parameters
sWhere Required. String that specifies where to insert the HTML text, using one of the following values: beforeBegin Inserts sText immediately before the object.
afterBegin Inserts sText after the start of the object but before all other content in the object.
beforeEnd Inserts sText immediately before the end of the object but after all other content in the object.
afterEnd Inserts sText immediately after the end of the object.
sText Required. String that specifies the HTML text to insert. The string can be a combination of text and HTML tags. This must be well-formed, valid HTML or this method will fail.
Return Value
No return value.
Example
var sHTML="<input type=button onclick=" +
"go2()" + " value='Click Me'><BR>"
var sScript='<SCRIPT DEFER>'
sScript = sScript +
'function go2(){ alert("Hello from inserted script.") }'
sScript = sScript + '</script' + '>';
ScriptDiv.insertAdjacentHTML("afterBegin",sHTML + sScript);
object.insertAdjacentHTML(sWhere, sText)
Parameters
sWhere Required. String that specifies where to insert the HTML text, using one of the following values: beforeBegin Inserts sText immediately before the object.
afterBegin Inserts sText after the start of the object but before all other content in the object.
beforeEnd Inserts sText immediately before the end of the object but after all other content in the object.
afterEnd Inserts sText immediately after the end of the object.
sText Required. String that specifies the HTML text to insert. The string can be a combination of text and HTML tags. This must be well-formed, valid HTML or this method will fail.
Return Value
No return value.
Example
var sHTML="<input type=button onclick=" +
"go2()" + " value='Click Me'><BR>"
var sScript='<SCRIPT DEFER>'
sScript = sScript +
'function go2(){ alert("Hello from inserted script.") }'
sScript = sScript + '</script' + '>';
ScriptDiv.insertAdjacentHTML("afterBegin",sHTML + sScript);
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
26 | Page Refresh/Reload | 황제낙엽 | 2007.08.24 | 517 |
25 | Javascript 내장객체 String | 황제낙엽 | 2007.04.10 | 630 |
24 |
유용한 자바스크립트 예제 몇가지 (Tree 및...)
![]() | 황제낙엽 | 2005.10.20 | 423 |
23 | 자바 스크립트 플러그인 | 황제낙엽 | 2005.11.22 | 401 |
22 |
JAVASCRIPT REFERENCE 파일
![]() | 황제낙엽 | 2005.11.22 | 435 |
21 |
JAVASCRIPT Debuger 프로그램
![]() | 황제낙엽 | 2005.11.22 | 320 |
20 |
SelectBox 밑에 CheckBox가 포함된 리스트 만들기
![]() | 황제낙엽 | 2007.01.16 | 841 |
19 | 3시간 걸려서 만든 입력폼 자릿수체크 스크립트 | 황제낙엽 | 2006.04.22 | 415 |
18 | innerHTML | 황제낙엽 | 2005.12.19 | 465 |
» | insertAdjacentHTML Method | 황제낙엽 | 2005.12.19 | 570 |
16 | 폼으로 XML 데이터 전송 (JSP+Javascript) | 황제낙엽 | 2005.12.04 | 442 |
15 | Methods and properties of Microsoft.XMLDOM | 황제낙엽 | 2005.12.04 | 406 |
14 | 슬라이딩 메뉴 | 황제낙엽 | 2005.12.02 | 466 |
13 | XML+JS 연동 다중셀렉트박스 (1) - <font color="brown">(MS Explorer 전용)</brown> | 황제낙엽 | 2005.12.02 | 369 |
12 | 풍선 도움말 | 황제낙엽 | 2005.11.24 | 310 |
11 | 소스 보기 막기 | 황제낙엽 | 2005.11.18 | 513 |
10 | 카페의 회람 . 막기 소스 | 황제낙엽 | 2005.10.21 | 218 |
9 | 브라우저에서 뒤로 가기 막기와 펑션키(function key) 막기 | 황제낙엽 | 2005.10.21 | 554 |
8 | 아이디 생성 조건 검사 자바스크립트 모듈 | 황제낙엽 | 2004.11.18 | 459 |
7 | 마우스 오버시 살짝 뒤로 물러나는 듯한 링크 -_-;; | 황제낙엽 | 2003.01.04 | 443 |