반응형

Internet Explorer 에서의 ajax 에서의 한글 깨짐 현상

IE에서만 encodeURI를 적용하는게 맞다.

// 윈도우인지 다른 브라우저인지 확인 
            var ua = window.navigator.userAgent;
            var postData;
            // 윈도우라면 ? 
            if (ua.indexOf('MSIE') > 0 || ua.indexOf('Trident') > 0) {
                postData = encodeURI(sendData);
            } else {
                postData = sendData;
            }

            $.ajax({
                url: "thumnailUpload.php", // Url to which the request is send
                type: "POST",             // Type of request to be send, called as method
                data: postData, // Data sent to server, a set of key/value pairs (i.e. form fields and values)
                contentType: false,       // The content type used when sending data to the server.
                cache: false,     

 

반응형

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

JSFIDDLE - https://jsfiddle.net/  (0) 2020.01.10
12 Extremely Useful Hacks for JavaScript  (0) 2019.12.31
JSON Editor Online  (0) 2019.11.26
[jQuery] AJAX Cross Origin plugin  (0) 2019.10.21
javascript, nl2br, nl to    (0) 2019.09.11
반응형

[인터넷 브라우저] Chrome인가? IE 인가?


모바일의 인기일 수 있다. PC가 아닌 다른 디바이스에서 인터넷 접근시 크롬으로~


그리고, 스마트폰 크롬의 즐겨찾기가  PC 크롬에서도 연동이 되기때문에 많이 사용할 수 밖엔.


구글 포토도 한 몫했다. 구글 포토에 업로드할때 PC 크롬 브라우저에서 업로드 하는 것이 빠르다.


2016년 3월 22일에 구글 포토가 유투브에  업데이트 기능을 올렸다.

앨범기능이 개선되었는데, 이벤트나 여행 등에서 찍은 사진들을 모아 잘 찍힌 사진들을 선별해서

새 앨범을 제안한다. 그리고, 그 앨범에서 각각의 사진에 위치나 캡션을 추가할 수 있다.

이런 기능은 구글 포토가 사진만 업로드 하는 것을 넘어 사용자에게 편리함과 그 사진을 더 오래 기억 할 수 있는 방법을 제시했다.


http://gs.statcounter.com/#browser-KR-monthly-201504-201604

 

 


Source: StatCounter Global Stats - Browser Market Share



Google Photos: Introducing New, Smarter Albums


게시일: 2016. 3. 22.

After an event or trip, Google Photos will now suggest a new album curated with your best shots and the locations of where you've been. Customize it, add text, and invite collaborators to add their photos. Telling your story has never been easier.

Google Photos is available on:
Android: https://goo.gl/55OnIr
iPhone & iPad: https://goo.gl/m5vj7r
Web: https://photos.google.com




반응형
반응형

hash tag 사용시 IE에서 title이 왜곡되는 현상

 

IE8에서 문서 제목 변경을 방지하는 a 방법이있다.

그것은 자동으로 URL의 hash를 기반으로 변화하고 있기 때문에 (WWW. #hash)

 

아래의 타이틀을 예를 들어

 

#691 로 hash change 하면 타이틀은 #691로 변경된다.

 

 

더 좋게 바꾸려면 아래와 같이 화면 load 시, 또는 스크립트 호출 후 타이틀을 재입력해주면 된다.

 

 

 

 

 

 

 

 

반응형
반응형

IE에서 문장  복사하기

 

[예제 1] 데이타만 미리 준비해두고 클립보드에 복사하기
<script language="JavaScript">
< !--
function copy() {
var data = "안녕하세요.\n찾아주셔서 반갑습니다.\n앞으로도 잘부탁드립니다.";
window.clipboardData.setData("Text",data);
alert('복사 되었습니다.');
}
//-->
< /script>

< span style="cursor:pointer" onClick="copy()">[인사말]</span>
< br />
< TEXTAREA NAME="" ROWS="20" COLS="40"></TEXTAREA>
[예제 2] 웹페이지 특정 문단부분만을 클립보드에 복사하기
<script language="JavaScript">
< !--
function copy(obj) {
var data = "";
for (var i=0; i<obj.childNodes.length; i++){
data += obj.childNodes[i].nodeValue||"\n";
}
window.clipboardData.setData("Text",data);
alert('복사 되었습니다.');
}
//-->
< /script>
<DIV ID="text1">
안녕하세요.<br />
찾아주셔서 반갑습니다.<br />
앞으로도 잘부탁드립니다.
< /DIV>

< span style="cursor:pointer" onClick="copy(document.getElementById('text1'))">[인사말]</span>
< br />
< TEXTAREA NAME="" ROWS="20" COLS="40"></TEXTAREA>
반응형

+ Recent posts