자바스크립트 location객체 설명 현재 페이지를 강제로 다른곳으로 이동시키거나 파라미터등 값을 가져올때 사용● location객체 프로퍼티 href 문서의 URL 주소 현재 페이지 주소 전체 host 호스트 이름과 포트 http://tessjds.tistory.com:80 hostname 호스트 컴퓨터이름 http://tessjds.tistory.com hash 앵커이름 #top pathname 디렉토리 이하 경로 /ceo/location.asp port 포트번호 부분 80 protocol 프로토콜 종류 http:// search URL 조회부분 oneNum=1&twoNum=1 //url이동location.href="갈 URL" //새로고침location.reload(); 더보기 pc 또는 모바일 기기에서 접속했는지 판단하기 1234567891011var filter = "win16|win32|win64|mac"; if(filter.indexOf(navigator.platform.toLowerCase()) > -1) { alert("pc"); } else { alert("mobile"); }Colored by Color Scriptercs 더보기 [jquery] jquery로 css position띄우기 1jQuery("#element").css({ "position": "fixed", "top": "0px", "left":"0px" });cs 더보기 이전 1 ··· 22 23 24 25 26 27 28 29 다음