COMING SOON 🚀

멋쟁이 고수님들 !!!!!! 좀 도와주세요 핼푸미 ㅠ_ㅠ



아 써놓고도 머라는지 모르겠...........

 <select onChange='if(this.selectedIndex) { this.blur(); window.open(options[selectedIndex].value); }'>
<option value="">사이트링크 선택</option>
<option value="http://daum.net">다 음</option>
<option value="http://naver.com">네이버</option>
<option value="http://empas.com">엠파스</option>
</select>

이걸로 셀렉트박스를 만들었는데염 ..
다 새창으로 열리긴 하거든여 ...
근데 머지...

사이즈가 .. 전체 화면으로 열려서 ...
한곳에만 사이즈 지정해서 열리게 할수 없을까요 ㅠㅠ

예를 들어.. 
 다음 http://daum.net.만.. 가로 200 세로 300 px 로 지정해서요 ㅠㅠ

후엥 ..ㅠ
어케 안될랑가요 ㅠ
|

댓글 5개

onchange="link_open(this);"
function link_open(obj) {
var link = obj.options[obj.selectedIndex].value;
if(link == "http://daum.net") {
window.open(link, "", "width=200, height=300");
} else {
window.open(link);
}
}
테스트는 안해봤지만...

value가 아니라 index 값만 따져도 되는 경우에는
if (obj.selectedIndex == 0) 이런식으로 하면 되겠습니다 ㅎㅎ
그런거 안됩니다 ㅋ
아래처럼 한번 해보세요.

<select
onChange='if(options[selectedIndex].value=="http://daum.net"){this.blur();window.open(options[selectedIndex].value,"","width=200, height=300");}else if(options[selectedIndex].value!=""){this.blur();window.open(options[selectedIndex].value);}'>
<option value="">사이트링크 선택</option>
<option value="http://daum.net">다 음</option>
<option value="http://naver.com">네이버</option>
<option value="http://empas.com">엠파스</option>
</select>
두분 다 감사드리구용 ~ 근데 한곳에만 사이즈 지정하고 나머지 2개는 지정 안하는 방법은 없나용 ????
두 스크립트 모두 한곳에만 크기를 지정하게 되있습니다.
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
15년 전 조회 2,030
15년 전 조회 1,851
15년 전 조회 1,751
15년 전 조회 1,815
15년 전 조회 1,859
15년 전 조회 2,192
15년 전 조회 1,752
15년 전 조회 1,858
15년 전 조회 1,846
15년 전 조회 2,024
15년 전 조회 6,363
15년 전 조회 3,342
15년 전 조회 2,471
15년 전 조회 2,014
15년 전 조회 1,749
15년 전 조회 1,989
15년 전 조회 2,226
15년 전 조회 1,666
15년 전 조회 1,555
15년 전 조회 1,855
15년 전 조회 2,084
15년 전 조회 1,420
15년 전 조회 1,415
15년 전 조회 1,698
15년 전 조회 2,035
15년 전 조회 1,721
15년 전 조회 1,699
15년 전 조회 1,744
15년 전 조회 1,849
15년 전 조회 2,080