본문 바로가기

728x90

Front end/JS (JavaScript)

(24)
[JavaScript]JSON 데이터 value 꺼내기 let data = {"name":"홍길동","age":"30"}; let JSONstringify_data = JSON.stringify(data); let JSONparse = JSON.parse(JSONstringify_data); console.log(JSONparse.name); console.log(JSONparse.age);
mobile zoom, 모바일 줌, pinch zoom 자바스크립트
자바스크립트 - 배열 중복 제거 (set)
자바스크립트(JavaScript) html select 선택시 이벤트, select 태그 option submit val1 val2 val3 submit
자바스크립트(JavaScript) - floodfill, 플러드필, 이미지에 색칠하기, 그림판, 이미지 클릭시 색채우기 // html // floodfill.js var floodfill = (function() { //Copyright(c) Max Irwin - 2011, 2015, 2016 //MIT License function floodfill(data,x,y,fillcolor,tolerance,width,height) { var length = data.length; var Q = []; var i = (x+y*width)*4; var e = i, w = i, me, mw, w2 = width*4; var targetcolor = [data[i],data[i+1],data[i+2],data[i+3]]; if(!pixelCompare(i,targetcolor,fillcolor,data,length,tolerance..
자바스크립트(JavaScript) - canvas 색채우기, 캔버스태그, HTML5 canvas채우기 스타일(색상) 지정하기 (fillStyle;채우기, globalAlpha;투명도 ) [펌] HTML5 canvas - 채우기 스타일 지정하기 (fillStyle, globalAlpha) * fill() 메소드 사용하는 경우에 fillStyle, globalAlpha 사용 ※ stroke() strokeStyle 속성 * 속성 - fillStyle => 채우기 색 지정 - globalAlpha => 색의 투명도 값 (0.0 ~1.0 ) 지정 결과보기 > 출처 : https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=javaking75&logNo=140170247450 HTML5 canvas - 채우기 스타일(색상) 지정하기 (fillStyle;채우기, globalAlpha;투명도 ) HTML5 canvas - 채우기 스타일 지정..
자바, 자바스크립트 브라우저별 User-Agent로직, User-Agent 를 이용한 브라우저 체크 [펌] // 브라우저별 로직 JAVA public String getBrowserinfo(HttpServletRequest request) { String userBrs = request.getHeader("User-Agent"); if (userBrs.indexOf("Swing") != -1) { userBrs = "Swing"; }else if (userBrs.indexOf("MSIE") != -1 || userBrs.indexOf("Trident") != -1) { if (userBrs.indexOf("Mozilla/5.0") != -1) { // HTML5 를 지원하는 브라우저 if (userBrs.indexOf("rv:11.0") != -1) { userBrs = "Internet Explorer 11..
자바스크립트(JavaScript) 클래스 추가, 제거 , 토글 (addClass, removeClass, toggleClass) btn1

728x90