블로그 이미지
암초보

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

Tag

01-06 21:04
2009. 9. 30. 09:32 프로그래밍/JavaScript

function setDateRange(selected_date_range){
  if(selected_date_range.value=="ALL"){
   document.search.startDate.value = "";
   document.search.endDate.value = "";
  }
  else if(selected_date_range.value=="WEEK"){
   document.search.startDate.value = getNextDate(-7);
   document.search.endDate.value = getNextDate(0);
  }
  else if(selected_date_range.value=="MONTH"){
   document.search.startDate.value = getNextDate(-30);
   document.search.endDate.value = getNextDate(0);
  }else  if(selected_date_range.value=="SET"){
   document.search.startDate.value = getNextDate(-(365*5));//기본 5년전부터.
   document.search.endDate.value = getNextDate(0);
  }
 }
 
 function setDateRangeButton(){
  if(document.search.startDate.value == ""){
   document.search.startDate.value = getNextDate(-(365*5));
   document.search.endDate.value = getNextDate(0);
  }
  document.search.date_range[3].checked= "checked";
 }
 
 function getNextDate(t){
  var current_time = new Date();
  var result = current_time.valueOf()+1000*60*60*24*(t);
  var result_time = new Date(result);
  var yy = result_time.getFullYear();
  var mm = result_time.getMonth()+1;
  if(mm<10)
   mm = "0"+mm;
  var dd = result_time.getDate();
  var date_string = yy+"-"+mm+"-"+dd;
  return date_string;
 }
posted by 암초보
2009. 9. 29. 15:09 프로그래밍/HTML&CSS

<table border="1" style="width:200px;"><tr><td>
ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD
</td></tr></table><p>

<table border="1" style="width:200px;"><tr><td style="word-break:break-all;">
ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD
</td></tr></table><p>

<table border="1" style="width:200px;"><tr><td>
홍길동 홍길동 홍길동 홍길동 홍길동 홍길동 홍길동 
</td></tr></table><p>

<table border="1"  style="width:200px;"><tr><td style="word-break:keep-all;">
홍길동 홍길동 홍길동 홍길동 홍길동 홍길동 홍길동
</td></tr></table>

<table border="1" style="width:200px;"><tr><td>
홍길동 홍길동 홍길동 홍길동 홍길동 홍길동 홍길동
</td></tr></table><p>

<table border="1"  style="width:200px;"><tr><td style="white-space:nowrap;">
홍길동 홍길동 홍길동 홍길동 홍길동 홍길동 홍길동
</td></tr></table>

결과 :

posted by 암초보
2009. 9. 28. 20:27 프로그래밍/JavaScript
// 자바스크립트 긁기

javascript:function r(d){d.oncontextmenu=null;d.onselectstart=null;d.ondragstart=null;d.onkeydown=null;d.onmousedown=null; d.body.oncontextmenu=null;d.body.onselectstart=null;d.body.ondragstart=null;d.body.onkeydown=null; d.body.onmousedown=null;};function unify(w){r(w.document);if(w.frames.length>0){for(var i=0;i<w.frames.length;i++){try{unify(w.frames[i].window);}catch(e){}};};};unify(self);alert("ok");


posted by 암초보