greenbrower用到的function.js代码集合第1/2页

时间:2021-05-28

//############################################################################# var g_nLastVisitCount; function LastVisitSetCount(nCount) { g_nLastVisitCount = nCount; } function LastVisitCheckAll() { for (var i=0;i<g_nLastVisitCount;i++) eval('LastVisit'+i+'.checked=LastVisitAll.checked'); } function LastVisitOpen() { for (var i=g_nLastVisitCount-1;i>=0;i--)//for (var i=0;i<g_nLastVisitCount;i++) { if (eval('LastVisit'+i+'.checked')) { strUrl = external.gbGetLastVisit("Url"+i); if (strUrl.length<1) break; try{ window.open(strUrl,'_blank'); }catch(e){} } } } function LastVisitCopyUrl() { var strTemp=''; try{ for (var i=0;i<g_nLastVisitCount;i++) { if (eval('LastVisit'+i+'.checked')) { strUrl = external.gbGetLastVisit("Url"+i); if (strUrl.length<1) break; strTemp += strUrl; strTemp += "\r\n"; } } }catch(e){} if (strTemp.length>1) window.clipboardData.setData("Text", strTemp); } function LastVisitWriteHead() { var strShowLastVisit = '1'; try{ strShowLastVisit = external.gbGetIni('ShowLastVisit'); }catch(e){} if (strShowLastVisit=='1') document.write("<tbody id=LastVisitDiv>"); else document.write("<tbody id=LastVisitDiv style='display: none'>"); } function LastVisitWriteTail(i) { document.write("</tbody></table>"); LastVisitSetCount(i); } function LastVisitWrite() { if (external.gbGetVersion==null) return; // document.writeln("<table id=1111 width=914 border=0 align=center cellspacing=1 bgcolor=#C6CFEF style=word-break:break-all>"); document.writeln(" <tr>"); document.writeln(" <td colspan=2 bgcolor=#E7EFFF class=STYLE1><div align=center class=STYLE7>"); document.writeln(" <label style=cursor:pointer; onClick=external.gbExec(33109)>GreenBrowser上次访问页面<\/label>"); document.writeln(" <label style=cursor:pointer; onClick=LastVisitShow()>【隐藏\/显示】<\/label>"); document.writeln(" <\/div><\/td>"); document.writeln(" <\/tr>"); // LastVisitWriteHead(); for (var i=0; i<50; i++) { strName = external.gbGetLastVisit("Name"+i); if (strName.length<1) break; strUrl = external.gbGetLastVisit("Url"+i); document.write("<tr><td width=22 bgcolor=#FFFFFF class=STYLE1 ><input type=checkbox id=LastVisit"+i+" checked></td><td bgcolor=#FFFFFF class=STYLE1> <a href="+strUrl+" title="+strUrl+" target=_blank>"+strName+"</a> <span class='STYLE2'>("+strUrl+")</span></td></tr>"); } if (i>0) document.write("<tr><td bgcolor=#FFFFFF class=STYLE1 ><input type=checkbox id=LastVisitAll onClick='LastVisitCheckAll()' checked></td><td bgcolor=#FFFFFF class=STYLE1> <input type=submit value='打开选中的网址' onClick='LastVisitOpen()'><input type=submit value='复制选中的网址' onClick='LastVisitCopyUrl()'></td></tr>"); else document.write("<tr><td bgcolor=#FFFFFF class=STYLE1>无上次访问页面!</td></tr>"); LastVisitWriteTail(i); } function LastVisitWriteEn() { if (external.gbGetVersion==null)//if not GreenBrowser, not show lastvisit return; // document.writeln("<table id=1111 width=760 border=0 align=center cellspacing=1 bgcolor=#C6CFEF style=word-break:break-all>"); document.writeln(" <tr>"); document.writeln(" <td colspan=2 bgcolor=#E7EFFF class=STYLE1><div align=center class=STYLE7>"); document.writeln(" <label style=cursor:pointer; onClick=external.gbExec(33109)>GreenBrowser Last Visited Page<\/label>"); document.writeln(" <label style=cursor:pointer; onClick=LastVisitShow()>[Hide\/Show]<\/label>"); document.writeln(" <\/div><\/td>"); document.writeln(" <\/tr>"); // LastVisitWriteHead(); for (var i=0; i<50; i++) { strName = external.gbGetLastVisit("Name"+i); if (strName.length<1) break; strUrl = external.gbGetLastVisit("Url"+i); document.write("<tr><td width=22 bgcolor=#FFFFFF class=STYLE1 ><input type=checkbox id=LastVisit"+i+" checked></td><td bgcolor=#FFFFFF class=STYLE1> <a href="+strUrl+" title="+strUrl+" target=_blank>"+strName+"</a> <span class='STYLE2'>("+strUrl+")</span></td></tr>"); } if (i>0) document.write("<tr><td bgcolor=#E7EFFF class=STYLE1 ><input type=checkbox id=LastVisitAll onClick='LastVisitCheckAll()' checked></td><td bgcolor=#E7EFFF class=STYLE1> <input type=submit value='Open Selected URL' onClick='LastVisitOpen()'><input type=submit value='Copy Selected URL' onClick='LastVisitCopyUrl()'></td></tr>"); else document.write("<tr><td bgcolor=#FFFFFF class=STYLE1>No Last Visited Page!</td></tr>"); LastVisitWriteTail(i); document.writeln("<br>"); } function LastVisitShow() { if (LastVisitDiv.style.display=="") { LastVisitDiv.style.display = "none"; external.gbSetIni('ShowLastVisit','0'); } else { LastVisitDiv.style.display = ""; external.gbSetIni('ShowLastVisit','1'); } } //############################################################################# var g_SearchList = [ ["百度", "http:///wnl.htm target=_blank>'+YYMMDD()+' '+weekday()+"<br><span id=ClockTime>"+GetTime()+"</span><br>"+solarDay()+'</a></div>' document.getElementById('time').innerHTML=str; } function ShowTime() { ShowDate(); setInterval('refreshCalendarClock()',1000); } 12下一页阅读全文

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章