You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.4 KiB
45 lines
1.4 KiB
<%@page contentType="text/html" pageEncoding="UTF-8"%> |
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|
"http://www.w3.org/TR/html4/loose.dtd"> |
|
<% |
|
int inx1=0,inx2=0,order=4; |
|
String ret=""; |
|
String src="A2A3A2A2A4A5A2A3A5"; |
|
String findStr="A2"; |
|
|
|
for(int ii=0;ii<order;ii++) |
|
{ |
|
inx1=src.indexOf(findStr,inx1); |
|
System.out.println("******************************* "+inx1); |
|
if(inx1>-1) inx1+=findStr.length(); |
|
if(inx1<0) System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!1111"); |
|
} |
|
ret=src.substring(0,inx1-2); |
|
System.out.println(ret); |
|
|
|
%> |
|
<html> |
|
<head> |
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
<title>JSP Page</title> |
|
<script> |
|
function checkForm1() |
|
{ |
|
var reg1=/^[\w\-]+@(?:(?:[\w\-]{2,}\.)+[a-zA-Z]{2,})$/; |
|
|
|
var homephone1=registForm.homephone1.value; |
|
|
|
if(!reg1.test(homephone1)) { alert("국번은 2-3자리 숫자만 입력해야 합니다."); document.registForm.homephone1.value=""; } |
|
alert(homephone1); |
|
} |
|
</script> |
|
</head> |
|
<body> |
|
<form name="registForm"> |
|
<h1><%=ret%></h1> |
|
<input type="text" name="homephone1"> |
|
<a href="#" onclick="checkForm1();"><img name="aaa" border="0" src="images/bt_enter.gif"></a> |
|
</form> |
|
</body> |
|
</html>
|
|
|