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>
'컴퓨터 > 언어,프로그래밍' 카테고리의 다른 글
[스크랩] #ifndef ~ #endif 와 #pragma once 의 차이점 (0) | 2009.07.17 |
---|---|
★자바스크립트와 ★PHP를 연동 (0) | 2009.07.15 |
MFC API 차이 (0) | 2009.07.08 |
자바스크립트 다섯번째 요약정리 (0) | 2009.07.07 |
자바스크립트 네번째 요약정리 (0) | 2009.07.07 |