Posted
Filed under Htm&Javascript
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
Posted
Filed under Htm&Javascript
[원문]  - http://www.tizag.com/javascriptT/javascriptconfirm.php

<html>
<head>
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("Leave tizag.com?")
if (answer){
alert("Bye bye!")
window.location = "http://www.google.com/";
}
else{
alert("Thanks for sticking around!")
}
}
//-->
</script>
</head>
<body>
<form>
<input type="button" onclick="confirmation()" value="Leave Tizag.com">
</form>
</body>
</html>
2010/07/12 00:41 2010/07/12 00:41
Posted
Filed under Htm&Javascript
[원문] http://www.omnibuscode.com/zeroboard/zboard.php?id=seeyou_programing_javascript&page=3&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=hit&desc=asc&no=93

< script language="javascript" type="text/javascript" >
    if (AC_FL_RunContent == 0) {
        alert("This page requires AC_RunActiveContent.js.");
    } else {
        AC_FL_RunContent(
            'codebase', '
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
            'width', '200',
            'height', '220',
            'src', 'leftflash',
            'quality', 'high',
            'pluginspage', '
http://www.macromedia.com/go/getflashplayer',
            'align', 'middle',
            'play', 'true',
            'loop', 'true',
            'scale', 'showall',
            'wmode', 'opaque',   << 중요한 부분
            'devicefont', 'false',
            'id', 'movieClip01',
            'bgcolor', '#FFFFFF',
            'name', 'movieClip01',
            'menu', 'true',
            'allowFullScreen', 'false',
            'allowScriptAccess','sameDomain',
            'movie', 'leftflash',
            'salign', ''
            ); //end AC code
    }
< /script >

레이어 팝업뛰울때 다음과 같이 옵션 값을 지정 한다.
'wmode', 'opaque',

2010/07/10 02:34 2010/07/10 02:34
Posted
Filed under Htm&Javascript
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
바디에 다음과같이 추가 한다.
2010/06/18 01:57 2010/06/18 01:57
Posted
Filed under Htm&Javascript
function replaceAll(str,orgStr,repStr)
{
    return str.split(orgStr).join(repStr);
}
2010/06/13 23:30 2010/06/13 23:30
Posted
Filed under Htm&Javascript
function function1() {
    window.moveTo(x,y);
}
2010/05/12 17:32 2010/05/12 17:32
Posted
Filed under Htm&Javascript

<html>
<head>
<title>마우스오른쪽 버튼 클릭 방지</title>
<script language=JavaScript>
 try {
 document.attachEvent('oncontextmenu', function () {
  return false;
 });
 } catch(e) {}
</script>

</head>
<body>
<p>마우스오른쪽버튼을 클릭해보세요.</p>
</body>
</html>

2010/04/29 15:50 2010/04/29 15:50
Posted
Filed under Htm&Javascript
http://msdn.microsoft.com/en-us/library/cc197035(VS.85).aspx


<button
    onclick="external.AddToFavoritesBar(
        'http://example.com/slices.aspx#weather',
        'Weather Conditions','slice')">
    Current Weather Conditions</button> 
2010/04/29 01:19 2010/04/29 01:19