Notice
Recent Posts
Recent Comments
05-07 04:28
YESHTML5
javascript, Window confirm() Method 본문
반응형
Javascript 에서 브라우져 기본팝업중에 confirm 이 있다.
결과페이지부터 보자.
이러한 형태로 구현해야될때,
소스코드는 다음과 같다.
1 2 3 4 5 6 7 8 | /*-- Window confirm() Method --*/ var txt = 'Press a button!'; var _popup = confirm(txt); if (_popup == true) { window.location.href = 'https://yeshtml5.com'; } else { alert('You click No'); } | cs |
여기서 취소/ 확인 인은 시스템의 언어에 따라서 변경이 어렵다.
어렵다고 한 이야기는 시스템팝업같이 보이는 레이어팝업으로 변경하면 가능하다.
프로젝트 경험상 시스템 및 기본 브라우져 속성은 그대로 쓰는것이 좋을것같다.
반응형
'React,React-Native' 카테고리의 다른 글
"Unable to boot device" error message (0) | 2022.01.15 |
---|---|
jquery Swiper Plugin (0) | 2018.11.23 |
CSS , background에 관해서 (0) | 2018.11.12 |
javascript countdown 카운트다운 (0) | 2018.11.06 |
css gradient animation (0) | 2018.11.06 |
Comments