2015의 게시물 표시

[JS] 접근성 윈도우 팝업 띄우기

분명 어디다가 적어 놨는데 또 까먹었다. 쉽게 가져다 쓸수 있게 다시 정리 함; 아 이넘의 건망증... <script type="text/javascript"> function windowOpen(e,width,height){ var url = e.href; window.open(url,'newWindow','width='+width+', height='+height+',top=0, left=0,toolbar=0, status=0, menubar=0, scrollbars=0, resizable=0,'); //window.open(url,'newWindow','width='+width+', height='+height+',top='+((screen.availHeight - height)/2 - 40) +', left='+(screen.availWidth - width)/2+',toolbar=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0'); } </script> <a href="http://www.daum.net" onclick="windowOpen(this,300,200); return false;" target="_blank">Window Open</a> window.open(url, name, features, replace); url : 표시 할 문서의 URL을 지정합니다. name : 새창의 윈도우의 이름을 지정합니다. 공백문자를 사용할 수 없습니다. 표시되는 부분은 없습니다. 링크에 대한 이름이라고 생각하시면 됩니다. features : 기능. 추가 할 수 있는 옵션 들입니

에디터 플러스 구문강조 하기

이런 기능이 있는지 몰랐다가 다른 분이 쓰는 PC에서 신기해서 찾아 보았습니다. 아 정말 쓸수록 끝이 없는 에디터 플러스의 기능들이란 ♡ http://demun.tistory.com/2028

[HTML] ie7 first-child 주석 버그

<style type="text/css"> div ul.listNum li: first-child {color:red;font-weight:bold;} </style> <div> <ul class="listNum"> <!-- 주석 --> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> </div> 위 코드 작성시 별다른 문제가 없이 첫번째 li의 폰트에 css가 적용이 될것 이다. 다만 ie7에서 주석으로 인해서 first-child가 적용이 안될 경우가 생긴다. 신기했음...

[JS]도메인 체크

// 곧바로 현재 페이지 주소 출력 document.writeln(location.href); // 변수에 넣어서 출력 var s = location.href; document.writeln(s); // 도메인 document.location.href.match(/http[s]*:\/\/([a-zA-Z0-9\-\.]*)/)[1] var link =  document.location.href; console.log(link); // 파라미터 var para = document.location.href.split("?"); console.log(para); //ex $(window).load(function(){ var url =  document.location.href; if(url.indexOf('#')!=-1){ var urlSplit = url.split('#'), para = '.' +urlSplit[1].split('=')[1], listLink = $('ul.tab-js > li > a'+para); listLink.trigger("click"); } });

[jQuery] 금액단위 제거 표기

구글신에겐 역시 없는게 없다... http://jsfiddle.net/praveenscience/R8JrF/1/ <table id="price"> <tr> <td class="price_01">700,000</td> <td>5,000</td> <td class="price_rs"></td> </tr> <tr> <td class="price_01">600,000</td> <td>3,000</td> <td class="price_rs"></td> </tr> <tr> <td class="price_01">500,000</td> <td>7,000</td> <td class="price_rs"></td> </tr> </table> <script type="text/javascript"> $(".price_01").each(function(){ var price_01 = $(this).html().replace(/,/g, ""); var price_02 = $(this).next().html().replace(/,/g, ""); var price = (price_01-price_02).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") var price_rs = $(this).next().next(".price_rs"