InStr, 특정 문자열 포함 여부 체크 > script

본문 바로가기

script

InStr, 특정 문자열 포함 여부 체크

작성일 12-09-04 11:23

페이지 정보

작성자서방님 조회 884회 댓글 0건

본문

<script type="text/javascript">
<!--
function FU_isString(string) {
 aryCode = "103,203,205,301,304,306,401,501,502,503,504,505,506,507,508,801,901".indexOf(string);
 if (aryCode==-1) {
  return true;
 }
 else {
  return false;
 }
}
//-->
</script>

 

 

 

<script type="text/javascript">
<!--
var tmpString = "abcdefghijklmnopqrstu";

if (tmpString.match("abc")){
 alert("포함됐네");
}
else {
 alert("포함 안됐네");
}
//-->
</script>

 

 

 

댓글목록

등록된 댓글이 없습니다.

게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기