'Htm&Javascript'에 해당되는 글 74건

  1. 2010/11/15 visualp jquery - cdn , microsoft jquery cdn
  2. 2010/11/08 visualp google, qrcode 생성 api
  3. 2010/11/08 visualp javascript, 인터넷 주소 체크 , CheckValidUrl
  4. 2010/11/08 visualp javascript, trim
  5. 2010/09/30 visualp 동적 form생성
  6. 2010/07/20 visualp 객체좌표값 구하기
  7. 2010/07/12 visualp confrime - javascript tutorial
  8. 2010/07/10 visualp AC_FL_RunContent .js 와 레이어 팝업
  9. 2010/06/30 visualp [javascript] ]DTREE
  10. 2010/06/18 visualp javascript 오른쪽 마우스 클릭 및 드래그 방지
[출처] - http://ajaxis.tistory.com/42

1. 시작페이지 설정 :


    <a href="javascript://"
          onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage        ('http://www.adic.co.kr');">
          <img src="이미지.gif"> </a>
 


2. 즐겨찾기 설정 :

      <a href="javascript:myFavorite()">
          <img src="이미지.gif" border="0"></a>


   <script language="javascript">
 
   function myFavorite() {
      window.external.AddFavorite('http://xxxxxx.com/', '바람의 검객!')
   }
 
  </script>

2011/01/25 06:48 2011/01/25 06:48
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/351

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/351

클립보드복사

Htm&Javascript RSS Icon ATOM Icon 2011/01/14 10:51 visualp
// Clipboard Copy Alert
function copy_text()
{
    if (window.event)
    {
        window.event.returnValue = true;
        window.setTimeout('copy_text2()', 25);
    }
}
function copy_text2()
{
    if (window.clipboardData) // IE
    {
        var result = window.clipboardData.setData('Text', "복사할 텍스트");
        alert ("텍스트가 복사되었습니다. 붙여넣기(Ctrl + V)하면 됩니다.");
    }
}
</script>
<input type="button" value="복사" onclick="javascript:copy_text();">
2011/01/14 10:51 2011/01/14 10:51
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/347

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/347

style="cursor:pointer"
를 사용 하면 IE/FF 에서 모두 표시 됩니다.
2010/12/27 12:22 2010/12/27 12:22
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/342

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/342

javascript timmer

Htm&Javascript RSS Icon ATOM Icon 2010/11/15 01:46 visualp
[원문] - http://www.mcfedries.com/javascript/timer.asp

<SCRIPT LANGUAGE = "JavaScript"> <!-- var secs var timerID = null var timerRunning = false var delay = 1000 function InitializeTimer() { // Set the length of the timer, in seconds secs = 10 StopTheClock() StartTheTimer() } function StopTheClock() { if(timerRunning) clearTimeout(timerID) timerRunning = false } function StartTheTimer() { if (secs==0) { StopTheClock() // Here's where you put something useful that's // supposed to happen after the allotted time. // For example, you could display a message: alert("You have just wasted 10 seconds of your life.") } else { self.status = secs secs = secs - 1 timerRunning = true timerID = self.setTimeout("StartTheTimer()", delay) } } //--> </SCRIPT>
To use this script, copy everything between and including the <SCRIPT> and </SCRIPT> tags and insert it on your page between the </HEAD> and <BODY> tags.

The following line sets the length, in seconds, of the timer:

secs = 10

The code decreases the "secs" variable by 1 each second. When "secs" gets to 0, the clock is stopped and that's when you do whatever it is you want to do once the timer is done (such as display a message or send the user to another page).

In the example above, I use a simple form button to start the timer (it also displays the countdown in the status bar). You could also start the timer (that is, run the InitializeTimer() function) automatically by adding the following to the <BODY> tag:

onLoad="InitializeTimer()"

2010/11/15 01:46 2010/11/15 01:46
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/332

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/332

microsoft jquery cdn

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>


<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script>

2010/11/15 01:16 2010/11/15 01:16
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/331

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/331

google, qrcode 생성 api

Htm&Javascript RSS Icon ATOM Icon 2010/11/08 07:25 visualp
http://chart.apis.google.com/chart?cht=qr&chs=160x160&chl=http://visualp.com
2010/11/08 07:25 2010/11/08 07:25
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/328

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/328

function CheckValidUrl(strUrl)
{
        var RegexUrl = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
        return RegexUrl.test(strUrl);
}
2010/11/08 02:52 2010/11/08 02:52
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/327

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/327

javascript, trim

Htm&Javascript RSS Icon ATOM Icon 2010/11/08 02:51 visualp
function trim(str) {
 return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
String.prototype.trim = function() {
    return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
2010/11/08 02:51 2010/11/08 02:51
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/326

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/326

동적 form생성

Htm&Javascript RSS Icon ATOM Icon 2010/09/30 16:26 visualp
출처  : http://blog.dbza.net/15




function createForm(nm,mt,at,tg) { var f=document.createElement("form"); f.name=nm; f.method=mt; f.action=at; f.target=tg; return f; } function addHidden(f,n,v) { var i=document.createElement("input"); i.type="hidden"; i.name=n; i.value=v; f.insertBefore(i); return f; } var frm=createForm("폼이름", "폼method", "URL", "_self"); frm=addHidden(frm, "폼name", "폼value"); . . . document.insertBefore(frm); frm.submit();
2010/09/30 16:26 2010/09/30 16:26
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/313

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/313

객체좌표값 구하기

Htm&Javascript RSS Icon ATOM Icon 2010/07/20 13:21 visualp
function get_obj_left(oDiv)
{
   if(oDiv.offsetParent==document.body)
     return oDiv.offsetLeft;
   else
     return oDiv.offsetLeft+get_obj_left(oDiv.offsetParent);
 }

function get_obj_top(oDiv)
{
   if(oDiv.offsetParent==document.body)
     return oDiv.offsetTop;
   else
     return oDiv.offsetTop+get_obj_top(oDiv.offsetParent);
}
2010/07/20 13:21 2010/07/20 13:21
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/295

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/295