자바스크립트 입문자인데..이미지 변경 스크립트..좀 도와주세여
checkbox가 발동하면 status1_off 이미지가 발동하는데..
checkbox1가 발동하면 status1_off가 그대로 있어서 이걸 어찌 해결해야할지 ㅠㅠ
checkbox가 기혼이고 checkbox1 이 미혼이라고 가정하에
기혼을 눌럿다가 미혼을 누르면 기혼버튼 이미지가 다시 올라가게 하고싶은데 잘 모르겠습니다..ㅠㅠ
좀 알려주시면 감사하겟습니다...
on_img 가 첫 이미지
눌렀을시 off_img 입니다;;
살려주세요 흑 ㅠㅠ
function CheckBox(self){ // 결혼 기혼 설정
var on_img = "images/btn_marital status1.png";
var off_img = "images/btn_marital status1_off.png";
$this = $("#"+self);
m = $this.attr('src');
if(m==off_img) $this.attr('src', on_img);
if(m==on_img) $this.attr('src', off_img);
}
var is_checked = false;
for(var i=1; i<=1; i++){
$src = $('#type'+i).attr('src');
if($src == on_img) {
is_checked = true;
}
}
if(!is_checked){
alert("타입을 선택해 주십시오");
return;
}
function CheckBox1(self){ // 결혼미혼 설정
var on_img = "images/btn_marital status2.png";
var off_img = "images/btn_marital status_off_2.png";
$this = $("#"+self);
m = $this.attr('src');
if(m==off_img) $this.attr('src', on_img);
if(m==on_img) $this.attr('src', off_img);
}
var is_checked = false;
for(var i=1; i<=1; i++){
$src = $('#type'+i).attr('src');
if($src == on_img) {
is_checked = true;
}
}
if(!is_checked){
alert("타입을 선택해 주십시오");
return;
}
checkbox1가 발동하면 status1_off가 그대로 있어서 이걸 어찌 해결해야할지 ㅠㅠ
checkbox가 기혼이고 checkbox1 이 미혼이라고 가정하에
기혼을 눌럿다가 미혼을 누르면 기혼버튼 이미지가 다시 올라가게 하고싶은데 잘 모르겠습니다..ㅠㅠ
좀 알려주시면 감사하겟습니다...
on_img 가 첫 이미지
눌렀을시 off_img 입니다;;
살려주세요 흑 ㅠㅠ
function CheckBox(self){ // 결혼 기혼 설정
var on_img = "images/btn_marital status1.png";
var off_img = "images/btn_marital status1_off.png";
$this = $("#"+self);
m = $this.attr('src');
if(m==off_img) $this.attr('src', on_img);
if(m==on_img) $this.attr('src', off_img);
}
var is_checked = false;
for(var i=1; i<=1; i++){
$src = $('#type'+i).attr('src');
if($src == on_img) {
is_checked = true;
}
}
if(!is_checked){
alert("타입을 선택해 주십시오");
return;
}
function CheckBox1(self){ // 결혼미혼 설정
var on_img = "images/btn_marital status2.png";
var off_img = "images/btn_marital status_off_2.png";
$this = $("#"+self);
m = $this.attr('src');
if(m==off_img) $this.attr('src', on_img);
if(m==on_img) $this.attr('src', off_img);
}
var is_checked = false;
for(var i=1; i<=1; i++){
$src = $('#type'+i).attr('src');
if($src == on_img) {
is_checked = true;
}
}
if(!is_checked){
alert("타입을 선택해 주십시오");
return;
}
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6030 | 12년 전 | 2827 | ||
| 6029 | 12년 전 | 2851 | ||
| 6028 | 12년 전 | 1476 | ||
| 6027 | 12년 전 | 896 | ||
| 6026 |
kiplayer
|
12년 전 | 807 | |
| 6025 | 12년 전 | 609 | ||
| 6024 | 12년 전 | 2821 | ||
| 6023 | 12년 전 | 2957 | ||
| 6022 |
|
12년 전 | 2112 | |
| 6021 |
Holyreign
|
12년 전 | 1341 | |
| 6020 | 12년 전 | 790 | ||
| 6019 | 12년 전 | 2864 | ||
| 6018 | 12년 전 | 3196 | ||
| 6017 | 12년 전 | 1244 | ||
| 6016 |
kiplayer
|
12년 전 | 10581 | |
| 6015 |
itlang
|
12년 전 | 1426 | |
| 6014 | 12년 전 | 429 | ||
| 6013 |
senseme
|
12년 전 | 1367 | |
| 6012 | 12년 전 | 3115 | ||
| 6011 | 12년 전 | 7132 | ||
| 6010 | 12년 전 | 8967 | ||
| 6009 | 12년 전 | 2874 | ||
| 6008 | 12년 전 | 2994 | ||
| 6007 | 12년 전 | 6678 | ||
| 6006 | 12년 전 | 10519 | ||
| 6005 | 12년 전 | 4056 | ||
| 6004 |
|
12년 전 | 588 | |
| 6003 | 12년 전 | 891 | ||
| 6002 | 12년 전 | 2355 | ||
| 6001 | 12년 전 | 689 | ||
| 6000 |
kiplayer
|
12년 전 | 3743 | |
| 5999 | 12년 전 | 441 | ||
| 5998 |
|
12년 전 | 2946 | |
| 5997 |
|
12년 전 | 3445 | |
| 5996 | 12년 전 | 2099 | ||
| 5995 |
kiplayer
|
12년 전 | 2176 | |
| 5994 |
|
12년 전 | 3274 | |
| 5993 |
windowhan
|
12년 전 | 680 | |
| 5992 | 12년 전 | 2905 | ||
| 5991 | 12년 전 | 5240 | ||
| 5990 | 12년 전 | 1643 | ||
| 5989 |
AMDbest
|
12년 전 | 1355 | |
| 5988 | 12년 전 | 1221 | ||
| 5987 |
kiplayer
|
12년 전 | 1137 | |
| 5986 |
한번잘해보자
|
12년 전 | 930 | |
| 5985 |
kiplayer
|
12년 전 | 3142 | |
| 5984 |
dsv421
|
12년 전 | 810 | |
| 5983 |
dsv421
|
12년 전 | 1511 | |
| 5982 |
dsv421
|
12년 전 | 5842 | |
| 5981 | 12년 전 | 3218 | ||
| 5980 |
MFBob
|
12년 전 | 2627 | |
| 5979 | 12년 전 | 3102 | ||
| 5978 |
AMDbest
|
12년 전 | 1461 | |
| 5977 | 12년 전 | 794 | ||
| 5976 | 12년 전 | 1212 | ||
| 5975 | 12년 전 | 1278 | ||
| 5974 | 12년 전 | 613 | ||
| 5973 |
kiplayer
|
12년 전 | 3554 | |
| 5972 |
kiplayer
|
12년 전 | 3978 | |
| 5971 |
kiplayer
|
12년 전 | 2302 | |
| 5970 |
kiplayer
|
12년 전 | 8294 | |
| 5969 |
kiplayer
|
12년 전 | 949 | |
| 5968 | 12년 전 | 8745 | ||
| 5967 |
|
12년 전 | 16906 | |
| 5966 | 12년 전 | 1233 | ||
| 5965 | 12년 전 | 711 | ||
| 5964 | 12년 전 | 6251 | ||
| 5963 | 12년 전 | 706 | ||
| 5962 | 12년 전 | 887 | ||
| 5961 | 12년 전 | 638 | ||
| 5960 | 12년 전 | 787 | ||
| 5959 |
|
12년 전 | 1124 | |
| 5958 | 12년 전 | 984 | ||
| 5957 |
웹디자인되고파
|
12년 전 | 1093 | |
| 5956 | 12년 전 | 3661 | ||
| 5955 | 12년 전 | 2143 | ||
| 5954 | 12년 전 | 4399 | ||
| 5953 | 12년 전 | 3092 | ||
| 5952 | 12년 전 | 4270 | ||
| 5951 | 12년 전 | 2081 | ||
| 5950 | 12년 전 | 1281 | ||
| 5949 | 12년 전 | 934 | ||
| 5948 | 12년 전 | 2083 | ||
| 5947 | 12년 전 | 5003 | ||
| 5946 |
dsv421
|
12년 전 | 1276 | |
| 5945 |
dsv421
|
12년 전 | 4123 | |
| 5944 |
dsv421
|
12년 전 | 5645 | |
| 5943 | 12년 전 | 1290 | ||
| 5942 | 12년 전 | 2542 | ||
| 5941 |
프로프리랜서
|
12년 전 | 1646 | |
| 5940 |
atria
|
12년 전 | 617 | |
| 5939 | 12년 전 | 2345 | ||
| 5938 | 12년 전 | 2087 | ||
| 5937 |
프로프리랜서
|
12년 전 | 773 | |
| 5936 |
프로프리랜서
|
12년 전 | 716 | |
| 5935 |
프로프리랜서
|
12년 전 | 3217 | |
| 5934 |
프로프리랜서
|
12년 전 | 1639 | |
| 5933 |
AMDbest
|
12년 전 | 658 | |
| 5932 |
AMDbest
|
12년 전 | 504 | |
| 5931 | 12년 전 | 8143 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기