<html>
<head>
<title>hello world</title>
<script language='javascript'>
function addplus(items)
{
var plussed = "";
for (var t = 1; t<= items.length ; t++)
{
if (items.substring(t-1,t) == " ")
{
plussed+="+";
}
else
{
plussed+=items.substring(t-1,t);
}
}
return plussed;
}
// Do the Search
function doSearch()
{
var words;
words = document.searchforit.query.value;
var searchitems;
searchitems=addplus(words);
var index;
// obtain the selectedIndex properties from the search engines option for
index = document.searchforit.service.selectedIndex;
if (index>= 0)
{
var site;
site = document.searchforit.service.options[index].value;
site+=searchitems;
var can2=site+" ";
if (notEmpty(searchitems))
{
//window.open("","mainWin");
//window.open(site,"_blank");
document.getElementById("gt22").src=site;
//window.location=site;
}
}
else
{
alert("검색 엔진을 선택하세요.");
}
}
// Check for empty contents in search searchitems
function notEmpty(word)
{
if (word == "" || word == null)
{
self.status="ENTER SEARCH searchitems";
alert("검색어를 입력하세요.");
document.searchforit.query.focus();
return false;
}
else
{
self.status = word + "을(를) 찾고 있습니다.";
return true;
}
}
</script>
</head>
<body >
<TABLE cellSpacing=0 cellPadding=2 border=0 align="center">
<tr>
<td>
<font color=blue size=9><b>검 색 엔 진</b></font>
</td>
</tr>
<TR>
<form name="searchforit" method="get" action="javascript:doSearch()">
<TD align=center>
<select name="service" style="font-size:9pt; BACKGROUND-COLOR:#FFFFFF;height:18px;">
<option value="http://search.daum.net/search?w=tot&DA=YZRR&t__nil_searchbox=btn&sug=&sq=&o=&q=">다 음</option>
</select>
<input type="text" name="query" size='23' >
<input type="button" value="search" onClick="doSearch()" target="targettd1">
</TD>
</form>
</TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=2 border=0 align="center">
<tr>
<td>
<iframe width="1280" height="800" frameborder="1" align="center" scrolling="auto" id="gt22" ></iframe>
</td>
</tr>
</TABLE>
</body>
</html>
구글 검색은 td에 못띄우는것 같다
다른 사이트 네이버 나 다음은 되는데
구글은 가져오질 못한다
막고 있는것 같음....
새창으로는 결과가 나온다
td 안에 띄우건 불가
댓글 없음:
댓글 쓰기