标题:HTML版本出现的不兼容,麻烦高手帮我解决一下,急急急,在线等了
只看楼主
heavenchueng
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-10-22
 问题点数:0 回复次数:2 
HTML版本出现的不兼容,麻烦高手帮我解决一下,急急急,在线等了
[bo]求各位高手帮我个忙啦
我的页面的网页头是
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
而我找的这个网页头是
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
改成<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">后下拉菜单就出不来了,麻烦高手帮忙解决一下,着急,在线等了
帮帮忙了   谢谢  谢谢
代码如下:[/bo]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>中国站长站 - 站长资讯 | 我们致力于为中文网站提供动力!</title>
<meta name="Keywords" content="站长,网站,资讯,站长网,站长资讯,站长工具" />
<meta name="Description" content="为站长提供及时全面的站长资讯" />
<link href="http://www. type="text/css" rel="stylesheet" />
<script type="text/javascript">
function isMatch(str1,str2)
{  
var index = str1.indexOf(str2);
if(index==-1) return false;
return true;
}
function ResumeError() {
return true;
}
window.onerror = ResumeError;
function $(id) {
    return document.getElementById(id);
}
// 相对尺寸
function GetOffsetTop (el, p) {
    var _t = el.offsetTop;
    var _p = el.offsetParent;
    while (_p) {
        if (_p == p) break;
        _t += _p.offsetTop;
        _p = _p.offsetParent;
    }
    return _t;
};
function GetOffsetLeft (el, p) {
    var _l = el.offsetLeft;
    var _p = el.offsetParent;
    while (_p) {
        if (_p == p) break;
        _l += _p.offsetLeft;
        _p = _p.offsetParent;
    }
    return _l;
};
function showMenu (baseID, divID) {
    baseID = $(baseID);
    divID  = $(divID);
    //var l = GetOffsetLeft(baseID);
    //var t = GetOffsetTop(baseID);
    //divID.style.left = l + 'px';
//    divID.style.top = t + baseID.offsetHeight + 'px';
    if (showMenu.timer) clearTimeout(showMenu.timer);
    hideCur();
    divID.style.display = 'block';
    showMenu.cur = divID;
    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
            hideCur();
            divID.style.display = 'block';
        };
        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
        }
        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
    function hideCur () {
        showMenu.cur && (showMenu.cur.style.display = 'none');
    }
}
function doClick_down(o){
     o.className="current";
     var j;
     var id;
     var e;
     for(var i=1;i<=4;i++){
       id ="down"+i;
       j = document.getElementById(id);
       e = document.getElementById("d_con"+i);
       if(id != o.id){
            j.className="";
            e.style.display = "none";
       }else{
        e.style.display = "block";
       }
     }
     }
    
function doClick_jy(o){
     o.className="current";
     var j;
     var id;
     var e;
     for(var i=1;i<=8;i++){
       id ="jy"+i;
       j = document.getElementById(id);
       e = document.getElementById("jy_con"+i);
       if(id != o.id){
            j.className="";
            e.style.display = "none";
       }else{
        e.style.display = "block";
       }
     }
     }
function doZoom(size){
    document.getElementById('textbody').style.fontSize=size+'px'
}
/// 修改及新增
function doClick_menu (o) {
    o.className = 'menu_gg';
    var j, id, e;
    for (var i = 1; i <= 11; i++) {
        id = 'menu' + i;
        j = document.getElementById(id);
        e = document.getElementById('menu_con' + i);
        if (id != o.id) {
              j.className = '';
              e.style.display = 'none';
        }
        else {
            e.style.display = 'block';
        }
     }
     var url = '';
     switch (o.innerHTML) {
        case '资讯':
            url = '/plus/search.php?searchtype=titlekeyword&keyword=';
            break;
        case '源码':
            url = 'http://down.';
            break;
        case '软件':
            url = 'http://www.';
            break;
        case '论坛':
            url = 'http://bbs.';
            break;
        case '博客':
            url = 'http://my.';
            break;
        case '交易':
            url = 'http://1m.';
            break;
        case 'GOOGLE':
            url = 'http://google.';
            break;
        case 'ALEXA':
            url = 'http://alexa.';
            break;
        case 'IP归属':
            url = 'http://tool.';
            break;
        case 'Whois':
            url = 'http://tool.';
            break;
        case '素材':
            url = 'http://sc.';
            break;
     }
     doClick_submit.url = url;
}
doClick_submit.url = '/plus/search.php?searchtype=titlekeyword&keyword=';
function doClick_submit () {
    var keyword = document.getElementsByName('keyword')[0].value;
    window.open(doClick_submit.url + keyword);
}
window.onload = function (){
    var keyword = document.getElementsByName('keyword')[0];
    keyword.onkeydown = function (e) {
        e = e || window.event;
        if (e.keyCode == 13) {
            doClick_submit();
        }
    };
}
</script>
</head>
<body>
<div class="container">
<div class="nav">
<div class="navinner">
  <ul class="navlist">
  <li><a href="/">首页</a></li>
  <li><a href="/News/Index.html" id="nav_1" onmouseover="showMenu('nav_1','subnav1')">新闻资讯</a>
    <div class="subnav disable" id="subnav1">
      <p class="pointer">.</p>
      <p><span>
      <a href="/News/It/Index.html">业界动态</a> |
      <a href="/News/Invest/Index.html">收购融资</a> |
      <a href="/News/Portals/Index.html">门户动态</a> |
      <a href="/News/Search/Index.html">搜索引擎</a> |
      <a href="/News/Game/Index.html">网络游戏</a> |
      <a href="/News/Biz/Index.html">电子商务</a> |
      <a href="/News/Media/Index.html">广告传媒</a> |
      <a href="/News/Soft/Index.html">厂商开发</a>
      </span></p>
    </div>  
  </li>
  <li><a href="/Webmaster/Index.html" id="nav_2" onmouseover="showMenu('nav_2','subnav2')">站长在线</a>
    <div class="subnav disable" id="subnav2">
        <p class="pointer">.</p>
      <p><span>
      <a href="/Webmaster/RecSite/Index.html">好站推荐</a> |
      <a href="/Webmaster/Gather/Index.html">站长聚会</a> |
      <a href="/Webmaster/Visit/Index.html">站长访谈</a> |
      <a href="/Webmaster/Club/Index.html">站长茶馆</a> |
      <a href="/Webmaster/Topsite/Index.html">网站排行</a>
      </span></p>
    </div>
  </li>
  <li><a href="/Webbiz/Index.html" id="nav_3" onmouseover="showMenu('nav_3','subnav3')">网站运营</a>
    <div class="subnav disable" id="subnav3">
      <p class="pointer">.</p>
      <p><span>
      <a href="/Webbiz/Exp/Index.html">建站经验</a> |
      <a href="/Webbiz/BizPlan/Index.html">策划盈利</a> |
      <a href="/Webbiz/Seo/Index.html">搜索优化</a> |
      <a href="/Webbiz/Promot/Index.html">网站推广</a> |
      <a href="/Webbiz/Free/Index.html">免费资源</a>
      </span></p>
    </div>      
  </li>
  <li><a href="/Design/Index.html" id="nav_4" onmouseover="showMenu('nav_4','subnav4')">设计在线</a>
    <div class="subnav disable" id="subnav4">
      <p class="pointer">.</p>
      <p><span>
      <a href="/Design/Coolsite/Index.html">酷站推荐</a> |
      <a href="/Design/Pages/Index.html">网页设计</a> |
      <a href="/Design/Rules/Index.html">WEB标准</a> |
      <a href="/Design/Video/Index.html">视频处理</a> |
      <a href="/Design/Activity/Index.html">设计活动</a>
      </span></p>
    </div>  
  </li>
  <li><a href="/Program/Index.html" id="nav_5" onmouseover="showMenu('nav_5','subnav5')">网络编程</a>
    <div class="subnav disable" id="subnav5">
      <p class="pointer">.</p>
      <p><span>
      <a href="/Program/Asp/Index.html">Asp编程</a> |
      <a href="/Program/Php/Index.html">Php编程</a> |
      <a href="/Program/.Net/Index.html">.Net编程</a> |
      <a href="/Program/Xml/Index.html">Xml编程</a> |
      <a href="/Program/Access/Index.html">Access</a> |
      <a href="/Program/Mssql/Index.html">Mssql</a> |
      <a href="/Program/Mysql/Index.html">Mysql</a>
      </span></p>
    </div>  
  </li>
  <li><a href="/Union/Index.html" id="nav_6" onmouseover="showMenu('nav_6','subnav6')">联盟资讯</a>
    <div class="subnav disable" id="subnav6">
      <p class="pointer">.</p>
      <p><span>
      <a href="/Union/News/Index.html">联盟新闻</a> |
      <a href="/Union/Intro/Index.html">联盟介绍</a> |
      <a href="/Union/Comment/Index.html">联盟点评</a> |
      <a href="/Union/Skill/Index.html">网赚技巧</a>
      </span></p>
    </div>
  </li>
  <li><a href="/Server/Index.html" id="nav_7" onmouseover="showMenu('nav_7','subnav7')">服务器</a>
    <div class="subnav disable" id="subnav7">
      <p class="pointer">.</p>
      <p><span>
      <a href="/Server/Web/Index.html">Web服务器</a> |
      <a href="/Server/Ftp/Index.html">Ftp服务器</a> |
      <a href="/Server/Mail/Index.html">Mail服务器</a> |
      <a href="/Server/Dns/Index.html">Dns服务器</a> |
      <a href="/Server/Win/Index.html">Win服务器</a> |
      <a href="/Server/Linux/Index.html">Linux服务器</a> |
      <a href="/Server/Safe/Index.html">安全防护</a>
      </span></p>
    </div>  
  </li>
  </ul>
</div>  
</div>
</div>
</body>
</html>
搜索更多相关主题的帖子: HTML 在线 麻烦 
2008-10-23 18:09
kai
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:52
帖 子:3450
专家分:59
注 册:2004-4-25
得分:0 
主要是那个dtd 的指示不能丢,就是这样:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.

-transitional.dtd">

自由,民主,平等,博爱,进步.
中华民国,我的祖国,中华民国万岁!中华民国加油!
本人自愿加入中国国民党,为人的自由性,独立性和平等性而奋斗!
2008-10-25 09:45
kai
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:52
帖 子:3450
专家分:59
注 册:2004-4-25
得分:0 
让我不能理解的是,你为什么要改它?

自由,民主,平等,博爱,进步.
中华民国,我的祖国,中华民国万岁!中华民国加油!
本人自愿加入中国国民党,为人的自由性,独立性和平等性而奋斗!
2008-10-25 09:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-240140-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.284421 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved