반응형

<script type="text/javascript">

setInterval("dpTime()",1000);
 function dpTime(){
     now = new Date();
     hours = now.getHours();
     minutes = now.getMinutes();
     seconds = now.getSeconds();

     if (hours > 12){
      hours -= 12;
  ampm = "오후 ";
     }else{
      ampm = "오전 ";
     }
     if (hours < 10){
      hours = "0" + hours;
     }
     if (minutes < 10){
      minutes = "0" + minutes;
     }
     if (seconds < 10){
      seconds = "0" + seconds;
     }
document.getElementById("dpTime").innerHTML = "<b>"+ ampm + "</b>" + hours + ":" + minutes + ":" + seconds;
 }

</script>

 

그리고 시간이 들어갈 곳에

<span id="dpTime"></span>

반응형
반응형

<script language="Javascript" type="text/javascript">
var host = location.host.toLowerCase();
var currentAddress = location.href;
if (host.indexOf("www")== -1)
{
currentAddress = currentAddress.replace("//","//www.");
location.href = currentAddress;
}
</script>

 

http://wowasc.com/ 으로 접속하였을때,

자동으로 http://www.wowasc.com/ 으로 붙여준다.

물론 그 뒤에 하위주소로 접근하여도 www를 붙여준다.

반응형
반응형

1. 자바스크립트 구문

//숫자만 입력 하세요

function checkNumber() {

var objEv = event.srcElement;

var numPattern = /([^0-9])/;

var numPattern = objEv.value.match(numPattern);

if (numPattern != null) {

alert("숫자만 입력하세요");

objEv.value = "";

objEv.focus();

return false;

}

}



2. 적용 해야 할 input 구문

<input type="text" name="holyDayLen" class="textField_Y" maxlength="5" size="5" value="10" onPropertyChange="checkNumber()">


//여기서 중요한 부분은 onChange가 아니라 onPropertyChange 라는 거다.. ㅡㅡ 많이 낚인다. 조심..!

// style="ime-mode:disabled;" 이건 한글만 못쓰게 만드는 구문 -!!


 

반응형
반응형

<script language="Javascript" type="text/javascript">
var host = location.host.toLowerCase();
var currentAddress = location.href;
if (host.indexOf("www")== -1)
{
currentAddress = currentAddress.replace("//","//www.");
location.href = currentAddress;
}
</script>

 

다른 PHP 소스들을 갖다 써본결과...

javascript 가 제일 잘 작동하고 나머지는 작동이 잘 안된다.

반응형
반응형

로그인 위젯일 경우
widgets\login_info\skins\스킨 폴더의 login_info.html 파일을 편집합니다.

{@
$oPointModel = &getModel('point');
$point = $oPointModel->getPoint($logged_info->member_srl);

$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('point');
$level = $oPointModel->getLevel($point, $config->level_step);
}
<p class="latestLogin">Point : <span>{$point} (Lv.{$level})</span></p>




회원 정보 페이지일 경우
modules\member\skins\스킨 폴더의 member_info.html 파일을 편집합니다.

{@
$oPointModel = &getModel('point');
$point = $oPointModel->getPoint($member_info->member_srl);

$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('point');
$level = $oPointModel->getLevel($point, $config->level_step);
}
<tr>
<th scope="row">Point</th>
<td>{$point} (Lv.{$level})</td>
</tr>


위 소스를 </tr> 밑에 추가하세요.

 

 

출처 : http://www.yoonz.net/index.php?document_srl=667

 

반응형
반응형

표현문자

숫자표현

문자표현

설명

-

&#00;-&#08;

-

사용하지 않음

space

&#09;

-

수평탭

space

&#10;

-

줄 삽입

-

&#11;-&#31;

-

사용하지 않음

space

&#32;

-

여백

!

&#33;

-

느낌표

"

&#34;

&quot;

따옴표

#

&#35;

-

숫자기호

$

&#36;

-

달러

%

&#37;

-

백분율 기호

&

&#38;

&amp;

Ampersand

'

&#39;

-

작은 따옴표

(

&#40;

-

왼쪽 괄호

)

&#41;

-

오른쪽 괄호

*

&#42;

-

아스트릭

+

&#43;

-

더하기 기호

,

&#44;

-

쉼표

-

&#45;

-

Hyphen

.

&#46;

-

마침표

/

&#47;

-

Solidus (slash)

0 - 9

&#48;-&#57;

-

0부터 9까지

:

&#58;

-

콜론

;

&#59;

-

세미콜론

<

&#60;

&lt;

보다 작은

=

&#61;

-

등호

>

&#62;

&gt;

보다 큰

?

&#63;

-

물음표

@

&#64;

-

Commercial at

A - Z

&#65;-&#90;

-

A부터 Z까지

[

&#91;

-

왼쪽 대괄호

\

&#92;

-

역슬래쉬

]

&#93;

-

오른쪽 대괄호

^

&#94;

-

탈자부호

_

&#95;

-

수평선

`

&#96;

-

Acute accent

a - z

&#97;-&#122;

-

a부터 z까지

{

&#123;

-

왼쪽 중괄호

|

&#124;

-

수직선

}

&#125;

-

오른쪽 중괄호

~

&#126;

-

꼬리표

-

&#127;-&#159;

-

사용하지 않음

&#160;

&nbsp;

Non-breaking space

¡

&#161;

&iexcl;

거꾸로된 느낌표

&#162;

&cent;

센트 기호

&#163;

&pound;

파운드

¤

&#164;

&curren;

현재 환율

&#165;

&yen;

|

&#166;

&brvbar;

끊어진 수직선

§

&#167;

&sect;

섹션 기호

¨

&#168;

&uml;

움라우트

&#169;

&copy;

저작권

ª

&#170;

&ordf;

Feminine ordinal

&#171;

&laquo;

왼쪽 꺾인 괄호

&#172;

&not;

부정

­

&#173;

&shy;

Soft hyphen

?

&#174;

&reg;

등록상표

&hibar;

&#175;

&macr;

Macron accent

°

&#176;

&deg;

Degree sign

±

&#177;

&plusmn;

Plus or minus

²

&#178;

&sup2;

Superscript two

³

&#179;

&sup3;

Superscript three

´

&#180;

&acute;

Acute accent

μ

&#181;

&micro;

Micro sign (Mu)

&#182;

&para;

문단기호

·

&#183;

&middot;

Middle dot

¸

&#184;

&cedil;

Cedilla

¹

&#185;

&sup1;

Superscript one

º

&#186;

&ordm;

Masculine ordinal

&#187;

&raquo;

오른쪽 꺾인 괄호

¼

&#188;

&frac14;

4분의 1

½

&#189;

&frac12;

2분의 1

¾

&#190;

&frac34;

4분의 3

¿

&#191;

&iquest;

거꾸로된 물음표

A

&#192;

&Agrave;

Capital A, grave accent

A

&#193;

&Aacute;

Capital A, acute accent

A

&#194;

&Acirc;

Capital A, circumflex accent

A

&#195;

&Atilde;

Capital A, tilde

A

&#196;

&Auml;

Capital A, dieresis or umlaut mark

A

&#197;

&Aring;

Capital A, ring (Angstrom)

Æ

&#198;

&AElig;

Capital AE diphthong (ligature)

C

&#199;

&Ccedil;

Capital C, cedilla

E

&#200;

&Egrave;

Capital E, grave accent

E

&#201;

&Eacute;

Capital E, acute accent

E

&#202;

&Ecirc;

Capital E, circumflex accent

E

&#203;

&Euml;

Capital E, dieresis or umlaut mark

I

&#204;

&Igrave;

Capital I, grave accent

I

&#205;

&Iacute;

Capital I, acute accent

I

&#206;

&Icirc;

Capital I, circumflex accent

I

&#207;

&Iuml;

Capital I, dieresis or umlaut mark

Ð

&#208;

&ETH;

Capital Eth, Icelandic

N

&#209;

&Ntilde;

Capital N, tilde

O

&#210;

&Ograve;

Capital O, grave accent

O

&#211;

&Oacute;

Capital O, acute accent

O

&#212;

&Ocirc;

Capital O, circumflex accent

O

&#213;

&Otilde;

Capital O, tilde

O

&#214;

&Ouml;

Capital O, dieresis or umlaut mark

×

&#215;

&times;

Multiply sign

Ø

&#216;

&Oslash;

width="130"Capital O, slash

U

&#217;

&Ugrave;

Capital U, grave accent

U

&#218;

&Uacute;

Capital U, acute accent

U

&#219;

&Ucirc;

Capital U, circumflex accent

U

&#220;

&Uuml;

Capital U, dieresis or umlaut mark

Y

&#221;

&Yacute;

Capital Y, acute accent

Þ

&#222;

&THORN;

Capital Thorn, Icelandic

ß

&#223;

&szlig;

Small sharp s, German (sz ligature)

a

&#224;

&agrave;

Small a, grave accent

a

&#225;

&aacute;

Small a, acute accent

a

&#226;

&acirc;

Small a, circumflex accent

a

&#227;

&atilde;

Small a, tilde

a

&#228;

&auml;

Small a, dieresis or umlaut mark

a

&#229;

&aring;

Small a, ring

æ

&#230;

&aelig;

Small ae diphthong (ligature)

c

&#231;

&ccedil;

Small c, cedilla

e

&#232;

&egrave;

Small e, grave accent

e

&#233;

&eacute;

Small e, acute accent

e

&#234;

&ecirc;

Small e, circumflex accent

e

&#235;

&euml;

Small e, dieresis or umlaut mark

i

&#236;

&igrave;

Small i, grave accent

i

&#237;

&iacute;

Small i, acute accent

i

&#238;

&icirc;

Small i, circumflex accent

i

&#239;

&iuml;

Small i, dieresis or umlaut mark

ð

&#240;

&eth;

Small eth, Icelandic

n

&#241;

&ntilde;

Small n, tilde

o

&#242;

&ograve;

Small o, grave accent

o

&#243;

&oacute;

Small o, acute accent

o

&#244;

&ocirc;

Small o, circumflex accent

o

&#245;

&otilde;

Small o, tilde

o

&#246;

&ouml;

Small o, dieresis or umlaut mark

÷

&#247;

&divide;

Division sign

ø

&#248;

&oslash;

Small o, slash

u

&#249;

&ugrave;

Small u, grave accent

u

&#250;

&uacute;

Small u, acute accent

u

&#251;

&ucirc;

Small u, circumflex accent

u

&#252;

&uuml;

Small u, dieresis or umlaut mark

y

&#253;

&yacute;

Small y, acute accent

þ

&#254;

&thorn;

Small thorn, Icelandic

y

&#255;

&yuml;

Small y, dieresis or umlaut mark

반응형
반응형

<SCRIPT type="text/javascript">
var mylat;
var mylong;
window.onload = function() {
 if(navigator.geolocation) {
  browserSupportFlag = true;
  navigator.geolocation.getCurrentPosition(function(position) {
   
   mylat = position.coords.latitude;
   mylong = position.coords.longitude;
   //alert(mylat);
   //$(".loading").hide();
   myLocation('1');
   obj.pingSearch(mylat,mylong);

   //self.location.href="<?=$g4[path]?>/_list3.php?mode=<?=$mode?>&xp="+mylat+"&yp="+mylong;
  });
 }
};

</SCRIPT>

 

mylat 이 X좌표

mylong이 Y좌표이다.

 

만약 이를 출력하고자 한다면,

function 내에서

 

document.write("X좌표 : "+mylat+" , Y좌표 : "+mylong;");

 

해주면 될거 같다.

 

+ http://sample.yjhoon.com/gboard4/maps2.js

반응형
반응형

css파일에 이렇게 써주면 된다.

 

a:focus {
 outline:none;
}

 

 

반응형

+ Recent posts