카테고리 없음2014. 1. 24. 13:48


입력체크소스.htm


<html>

<head>

<Title>뱅크CGI</Title>

<script language="JavaScript">

<!-- Hide

function test1(form) {

  if (form.text1.value == "")

    alert("입력을 안했다고요..")

  else {

   alert("안녕하셔요"+form.text1.value+"! 입력성공");

  }

}

function test2(form) {

  if (form.text2.value == "" ||

      form.text2.value.indexOf('@', 0) == -1)

        alert("E-mail 형식에 맞게 쓰라고요!");

  else alert("OK!");

}

// -->

</script>

</head>

<BODY BGCOLOR="#FFFFFF">

<form name="first">

이름써요:<br>

<input type="text" name="text1">

<input type="button" name="button1" value="입력확인" ="test1(this.form)">

<P>

E-mail 쓰기:<br>

<input type="text" name="text2">

<input type="button" name="button2" value="입력확인" ="test2(this.form)">

</body>

 

 

 

 

 

</HTML> 

Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:48

다중파일업로드.htm




<html>
<head>
<script language="javascript">
function AddFile()
{
var objTbl = document.all["tblAttFiles"];
var objRow = objTbl.insertRow();
var objCell = objRow.insertCell();
objCell.innerHTML =
"입력:\n" +
"<input type=file onChange='CkImageVal()' name=AttFile[] size=40>";
document.recalc();
}

function CkImageVal() {
var oInput = event.srcElement;
var fname = oInput.value;
if((/(.jpg|.jpeg|.gif|.png)$/i).test(fname))
oInput.parentElement.children[0].src = fname;
else
alert('이미지는 gif, jpg, png 파일만 가능합니다.');
}
</script>

</head>
<body>

<table id=tblAttFiles cellspacing=0 border=0>
<tr><td>
입력: <input type=file name=AttFile[] size=40 onChange="CkImageVal()" class=textidpass>
</td></tr>
</table><br>

<input type=button value='이미지 입력 추가' ="AddFile()">


</body>
</html>


Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:47


약관에 동의.htm


<title>뱅크CGI</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function check(g)
{
if(g.yes.checked != true) {
alert('약관에 동의 하셔야 합니다.');
return false;
} else {
alert('약관에 동의하셨습니다.');
self.close(); //-- Location.href='이동될 경로'; 이렇게 활용하셔도...됩니다..
}
}
//-->
</SCRIPT>
</HEAD>
<center>
<form name="form">
<input type=checkbox name=yes value=1> 약관에 동의하십니까?<BR><BR><BR>
<input type="button" value="약관동의 확인" ="return check(this.form)">
</form>
</center>


Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:46


영문금지.htm



<input type="text" style="ime-mode:disabled">

 

위의소스를 바디에 사용하면된다

 

영문제한은 위에 첨부파일

Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:46


인풋텍스트배경색넣기.htm


<script>

// 원하는 포커스 배경
focusColor.color = '#ffcccc'; // 설정하지 않았을때 포커스배경색

function focusColor(objElm,strColor)
{
focusColor.oldcolor = objElm.style.backgroundColor;
objElm.style.backgroundColor = strColor || focusColor.color;
}

function blurColor(objElm)
{
objElm.style.backgroundColor = focusColor.oldcolor;
}

</script>

<form>

<input type="text" ="focusColor(this)" ="blurColor(this)" /> <br />
<input type="text" ="focusColor(this,'#99ccff')" ="blurColor(this)" /> <br />
<input type="text" ="focusColor(this,'#00cc00')" ="blurColor(this)" /> <br />

</form>


Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:45

<form>
<input type="text" name="jumin1" size="6" onkeyup="if(this.value.length==6){this.form.jumin2.focus();}"> - <input type="text" name="jumin2" size="7">
</form>


Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:45

<meta http-equiv="imagetoolbar" content="no">

 

헤드와헤드사이에 위의태그를 넣어주면 된다.

Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:39



경고창에클릭해야페이지가 열린다.htm



*현재는 경고창출력후 본 페이지가 보이게 설정되었습니다.

소스


<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var requiredfrom = "index.html"; // required prev. page

if (document.referrer.indexOf(requiredfrom) == -1) {

alert("이곳을 방문하시려면 " + requiredfrom + "파일을 거쳐야 합니다.");

window.Location=requiredfrom;

}

// End -->

</script>


Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:38

id입력폼.htm




<style>
body,tr,td,select,textarea,table,layer {font-family:"굴림"; font-size:9pt; color:#000000; line-height:13pt;}
input { font-size:9pt; border:solid 1px #cccccc; padding:1px;height:20px;}
a:active { font-family: "verdana";font-size: 9pt; color:#000000; letter-spacing: -1px; text-decoration: none; line-height:15pt;}
a:hover { font-family: "verdana";font-size: 9pt; color:#999999; letter-spacing: -1px; text-decoration: none; line-height:15pt; text-decoration:none}
a:link { font-family: "verdana"; font-size: 9pt; color:#000000; letter-spacing: -1px; text-decoration: none; line-height:15pt;}
a:visited { font-family: "verdana"; font-size: 9pt; color:#000000; letter-spacing: -1px; text-decoration: none; line-height:15pt;}
.small_font { font-family:돋움; font-size: 8pt; letter-spacing: -1px;}
a.small_font:active { font-family:돋움; font-size: 8pt; letter-spacing: -1px; text-decoration: none}
a.small_font:hover { font-family:돋움; font-size: 8pt; letter-spacing: -1px; text-decoration: none}
a.small_font:link { font-family:돋움; font-size: 8pt; letter-spacing: -1px; text-decoration: none}
a.small_font:visited { font-family:돋움; font-size: 8pt; letter-spacing: -1px; text-decoration: none}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" width="50" style="padding-right:5px;"><font color="4B4B4B" class="small_font">아이디</font></td>
<td>
<input class=input type="text" name="custid" size="10" maxlength="15" style="width:65px;">
</td>
</tr>
<tr>
<td align="right" style="padding-right:5px;"><font color="4B4B4B" class="small_font">비밀번호</font></td>
<td>
<input type="password" class=input name="custpass" size="10" maxlength="15" style="width:65px;">
</td>
</tr>
</table>


Posted by 갓리버리
카테고리 없음2014. 1. 24. 13:37


바탕_화면.zip



소스1

<body 허용되지않은 태그 사용중="return false" o-dragstart="return false" o-selectstart="return false">

 

 

소스2

<SCRIPT LANGUAGE="JavaScript">
<!--
function click() {
if (event.button==2) {
alert('오른쪽 버튼 사용금지');
}
}
function keypressed(){
if(event.ctrlKey){
alert('Ctrl키 사용금지');
}

if(event.altKey){
alert('Alt키 사용금지');
}
}
document.=click ;
document.onkeydown=keypressed ;
// -->
</SCRIPT>
<center>컨트롤 이나 오른쪽 버튼을 클릭해 보세요</center>

 

 

Posted by 갓리버리