这样一个页面
http://localhost/update.html?ver=936TWL5.21&yid=-1
看出他带有一些参数ver=XXXXX&yid=XXXXXX
参数的内容不是固定的。
我想这个页面载入时自动转到
http://localhost/update.aspx?ver=936TWL5.21&yid=-1
html页面上该写什么代码实现?谢谢大家

解决方案 »

  1.   

    http://www.cnblogs.com/sunnycoder/archive/2010/02/28/1674998.html使用JS获取html的request.querystring就行了
      

  2.   

    使用的时候,
    在你的update.html的<head></head>中加上如上代码:<head>
    <script type="text/javascript">
    function getQueryString(){     var result = location.search.match(new RegExp("[\?\&][^\?\&]+=[^\?\&]+","g"));      if(result == null){         return "";     }     for(var i = 0; i < result.length; i++){         result[i] = result[i].substring(1);     }     return result;
    }
    this.location="http://localhost/update.aspx?"+getQueryString();
    </head>这就OK了
      

  3.   

    在iis里面,把.html映射为asp,net处理程序就 可以了,
      

  4.   


    不需要,还是用JS获取querystring比较方便呵呵
      

  5.   

    类似这样的3http://www.xueit.com/html/2009-11-09/21-820741206750.html
      

  6.   

    本帖最后由 net_lover 于 2011-02-24 13:34:47 编辑
      

  7.   

    var href =window.location.href;//获取当前地址
    var po=href.lastIndexOf('?');
    var paremater = href.substr(po,href.length-po);//截字符串获取参数
    window.location.href='http://localhost/update.aspx?'+paremater ;// 跳转直接手敲的,要我做的话大概就是这样的,有错误再改改
      

  8.   


    window.location.href=window.location.href.replace('.html?','.aspx?')
      

  9.   

    选择.aspx的扩展,选择修改,把.aspx修改成.html就可以了 
    再不就复制.aspx的执行文件,新建一个.html的,执行文件就填写复制的.aspx的那个
    很多,context.writerpath
    urlreqwriter重写URL