끄적끄적

반응형

function xlink(E,URL)

{

 

  switch(E)

  {

  case 'new': window.open( URL,'new','left=100, top=100, width=640, height=480, resizable, directories, location, menubar, scrollbars, toolbar, status');

    break;

  case 'parent':

    parent.document.location.href = URL;

    break;

  case 'iframe_document_write':

    var imgtarget = window.open('','iframe_name_main');

        imgtarget.document.open();

        imgtarget.document.write('<a href="http://weezzle.net/">aaa');

        imgtarget.document.write('</a>');

        imgtarget.document.close();

    break;

    

  case 'iframe_link' :

    document.iframe_name_main.location.href = URL;

    break;

    

  default:

    document.location.href = URL;

    break;

  }

}

function xIFrameSize () { 

 try

 { 

  var iframeElement = xGetElementById('iframe');

  if(iframeElement==null) return;

  if (iframeElement.contentDocument && iframeElement.contentDocument.body.offsetHeight) { //ns6 syntax

   iframeElement.style.height =iframeElement.contentDocument.body.offsetHeight+50+'px'; 

  } else if (iframeElement.Document && iframeElement.Document.body.scrollHeight) { //ie5+ syntax

   iframeElement.style.height =iframeElement.Document.body.scrollHeight+50+'px'; 

  } else {

   iframeElement.style.height = 1000+'px';

  }

 } catch(e) {}



function Button_Press_Event(value) { xlink('iframe_link','http://weezzle.net'); }



<select name="Posting_Site_Name" size="5" onclick="Button_Press_Event(this.value);">

                    <option selected value="aaa">[AAA]</option>

</select>


반응형
Please Enable JavaScript!
Mohon Aktifkan Javascript![ Enable JavaScript ]