Develop
2013.04.23 15:53
[js] 실행되는 디렉토리 확인하는 스크립트..
조회 수 6771 댓글 0
주소표시줄 읽어와서 호스트 문자열 떼고 디렉토리 리턴~
<script> function test() { var url = location.href; var tmp = url; len = url.length; while(1){ s = tmp.indexOf("/"); if(s>=0) tmp = tmp.substr(s+1, len); else break; } tmp = url.replace("/"+tmp, ""); while(1){ s = tmp.indexOf("/"); if(s>=0) tmp = tmp.substr(s+1, len); else break; } alert(tmp); } </script> <input type="button" value="URL 보기" onClick="test()">
-
[ios] Touch ID 적용 샘플 코드 (예제)
-
[ios] UDID 사용 제한에 따른 대안들
-
[ios] UDID와 UUID (디바이스의 Unique Identifier)
-
[ios] UIAlertView 초간단 샘플 ㅎㅎ
-
[ios] UIButton multi-line iOS7
-
[ios] UIColor 지정에서 RGB define ㅎㅎ
-
[ios] UILabel top alignㅎㅎ
-
[ios] UITableView 특정 Row만 Update
-
[ios] UIView에서 상위 UIViewController 가져오기
-
[ios] UIWebView 캐쉬 삭제
-
[ios] UIWebView 쿠키 유지
-
[ios] UIWebView를 이용한 로컬 HTML 파일 표시