js利用google翻译接口把网页翻译成各国语言 13 April 2011 16:09 Wednesday by 小屋 浏览(2195)

网页翻译为德语(Translate Page To German)

<a href="javascript: void(window.open('http://translate.google.com/translate?u='+escape(location.href)+'&amp;langpair=en%7Cde', 'English_to_German', 'resizable,scrollbars,status'))">网页翻译为德语(Translate Page To German)</a>

网页翻译为西班牙语(Translate Page To Spanish)

<a href="javascript: void(window.open('http://translate.google.com/translate?u='+escape(location.href)+'&amp;langpair=en%7Ces', 'English_to_Spanish', 'resizable,scrollbars,status'))">网页翻译为西班牙语(Translate Page To Spanish)</a>

网页翻译为法语(Translate Page To French)

阅读全文>>

js - 刷新框架及页面的方法总结 03 November 2010 16:32 Wednesday by小屋 浏览(1629)

看一个简单的例子:

下面以三个页面分别命名为frame.htmltop.htmlbottom.html 为例来具体说明如何做。

frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> frame </TITLE>
</HEAD>
<frameset rows="50%,50%">
<frame name=top  src="top.html">
<frame name=bottom  src="bottom.html">
</frameset>
</HTML>

现 在假设top.html (即上面的页面) 有七个button来实现对bottom.html (即下面的页面) 的刷新,可以用以下七种语句,哪个好用自己看着办

阅读全文>>

又一枚iframe高度自适应代码 - (兼容FF,Opera,Safari多浏览器) 05 October 2010 15:38 Tuesday by小屋 浏览(1469)

  1. <script type="text/javascript">
  2. function  SetCwinHeight(iframeObj){  
  3. if  (document.getElementById){   
  4.    if  (iframeObj){  
  5.      if  (iframeObj.contentDocument && iframeObj.contentDocument.body.offsetHeight){  
  6.       iframeObj.height = iframeObj.contentDocument.body.offsetHeight;  
  7.       }  else   if  (document.frames[iframeObj.name].document && document.frames
  8. [iframeObj.name].document.body.scrollHeight){  iframeObj.height = document.frames
  9. [iframeObj.name].docum

阅读全文>>

利用 javascript实现web页面刷新方法 - 总结 17 August 2010 15:29 Tuesday by小屋 浏览(1591)

Javascript刷新页面的几种方法
1    history.go(0)
2    location.reload()
3    location=location
4    location.assign(location)
5    document.execCommand('Refresh')
6    window.navigate(location)
7    location.replace(location)
8    document.URL=location.href

自动刷新页面方法:
1. 页面自动刷新:把如下代码加入<head>区域
<meta http-equiv="refresh" content="20">
其中20指每隔20秒刷新一次页面.

2. 页面自动跳转:把如下代码加入<he

阅读全文>>

基于jquery的页面定时跳转 27 June 2010 9:25 Sunday by小屋 浏览(1919)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>err.html</title>
   
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <script src="scripts/jQuery/jquery.js" type="text/javascript"></script>
    <script language="javascript">
        $(document).ready(function() {
            function jump(count) {
                window.setTimeout(function(){
                    count--;
                    if(count > 0) {

阅读全文>>