타겟 설정 좀 도아주세요. 채택완료

새창이 뜨는데요.

어느 부분에 target="_parent" 넣어줘야 할까요?


그리고 박스가 작게 나오는데

좀 크게 나오게 할 수 있을까요?


c8ef40a1933e0fd3d80a65b411238867_1499841471_1556.jpg
 

Copy
<?phpif (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 1);?><script>jQuery(document).ready(function(){        var select = $("select#color");        select.change(function(){        var select_name = $(this).children("option:selected").text();        $(this).siblings("label").text(select_name);    });});</script><!-- <?php echo $bo_subject; ?> 최신글 시작 { --><div id="select_box"><select id="color" title="인증업체 선택" onchange="if(this.value) window.open(this.value);"><option selected="selected" value=''>인증업체 선택</option><?php for ($i=0; $i<count($list); $i++) {echo "<option value='{$list[$i]['wr_link1']}'>{$list[$i]['subject']}</option>";} ?></select></div><!-- } <?php echo $bo_subject; ?> 최신글 끝 -->
 

답변 3개

채택된 답변
+20 포인트

<style>

select#color { width:200px; line-height:35px; height:35px; border:1px solid #ddd }

</style>


<select id="color" title="인증업체 선택" onchange="if(this.value) window.open(this.value, '_parent');">

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

아주 잘됩니다.
답변 감사합니다. (__)

댓글을 작성하려면 로그인이 필요합니다.

Onchange="f_open(this.value);" 이걸 처리해 보세요

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

위에서 작성하신 부분의


Copy
<select id="color" title="인증업체 선택" onchange="if(this.value) window.open(this.value);">


영역에서

onchange 영역을 다시 작성하세요


함수로 만들어 처리하는방식으로 설명을 드리면 

Onchange="f_open(this.value);"


와 같이 처리를 하시고


function f_open(val){

if (val) {

    window.open(url, target, [option]);

}

}


하시면 됩니다.


https://www.w3schools.com/jsref/met_win_open.asp

를 참고해보세요


target 을 처리하는 방식중에는 form 을 사용하는 방식도 있습니다.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

답변감사합니다. (__)

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고