화면 » Api

browserhistorypushstate

Description

브라우저 History 오브젝트의 pushState API를 호출한다

Parameters

Parameters Type Description
objStateDate INSTANCE 브라우저 History Entry와 연동할 자바스크립트 데이터 오브젝트
strUrl STRING [옵션] 브라우저 History Entry URL (기본값: 공백문자열)

Return Value

Type Description
BOOL 정상 처리 여부

Example

function screen_on_load() { // 기본페이지를 등록한다. screen.browserhistoryreplacestate({ page: 0 }); document.title = "기본페이지"; } function moveNextPage() { screen.browserhistorypushstate({ page: 1 }, "/next"); document.title = "다음페이지"; tab1.settabitemfocus(1); } function btnLogin_on_mouseup(objInst) { this.moveNextPage(); } function screen_on_browserpopstate(objStateData) { console.log(objStateData); if (!objStateData) { return; } if (objStateData.page == 0) { // 기본페이지로 이동하는것이다 tab1.settabitemfocus(0); document.title = "기본페이지"; } if (objStateData.page == 1) { document.title = "다음페이지"; tab1.settabitemfocus(1); } }

See Also

browserhistoryreplacestate

Viewer Ver.

9.1.1.1

Update Date

20220511