主题:大麻烦,有谁见过这样的情况?
下面三个图依次是在腾旬tt,火狐和dw下看到的内容,为什么tt下会不正常呢?
主要就是在tt和ie下的问题,火狐的问题我可以解决。
[img]http://blog.programfan.com/upfile/200706/20070621202850.jpg[/img]
[img]http://blog.programfan.com/upfile/200706/2007062120312.jpg[/img]
[img]http://blog.programfan.com/upfile/200706/20070621203836.jpg[/img]
代码分两段
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.divtl{
background-color:#E4EBF8;
vertical-align:top;
text-align:center;
font-size:12px;
font-weight:bold;
}
.div1 {
height:24px;
border-style:solid;
border:1px;
border-color:#000000;
font-weight:bold;
font-size:12px;
line-height:15px;
vertical-align:middle;
border-top:0px;}
.div2 {
height:24px;
border-style:solid;
border:1px;
border-color:#000000;
line-height:24px;
text-align:center;
vertical-align:middle;
font-size:12px;
border-top:0px;
border-left:0px;
}
.div3 {
border-style:solid;
border:1px;
border-color:#000000;
background-color:#FFFFFF;
text-align:center;
vertical-align:middle;
font-size:14px;
border-top:0px;
border-left:0px;
}
a:link { text-decoration:none;}
a:active { text-decoration:none}
a:hover { text-decoration:none;}
a:visited { text-decoration:none;}
.smalltxt { font: 12px Tahoma, Verdana, arial, helvetica,宋体 }
.div4{float: left;}
-->
</style></head>
<body bgcolor="#dbeffb">
<%
dsn="dsn=km11sc; uid=sa; pwd=111111;"
username=request.Cookies("ui")("name")
if isnull(username) or isempty(username) then response.Redirect("error.asp?message=请先登录")
set rs = Server.CreateObject("ADODB.recordset")
sql="select * from person where username='"&username&"'"
rs.open sql,dsn,1,1
if rs.eof or rs.bof then response.Redirect("error.asp?message=没有该用户")
if not (isnull(rs("其他联系方式1")) or isempty(rs("其他联系方式1"))) then
Set regEx = New RegExp
regEx.Pattern = "([^\|]+)\|([^\|]+)$"
set Matches=regEx.Execute(rs("其他联系方式1"))
for each Match in Matches
othern1=Match.SubMatches(0)
otherv1=Match.SubMatches(1)
next
Set regEx = Nothing
end if
if not (isnull(rs("其他联系方式2")) or isempty(rs("其他联系方式2"))) then
Set regEx = New RegExp
regEx.Pattern = "([^\|]+)\|([^\|]+)$"
set Matches=regEx.Execute(rs("其他联系方式2"))
for each Match in Matches
othern2=Match.SubMatches(0)
otherv2=Match.SubMatches(1)
next
Set regEx = Nothing
end if
cb=rs("所属公司")
if isnull(cb) or isempty(cb) then
cb="您没有填写"
else
set rs1 = Server.CreateObject("ADODB.recordset")
sql="select 公司名称 from company where 公司编号='"&cb&"'"
rs1.open sql,dsn,1,1
if not(rs1.eof or rs1.bof) then
cb=rs1("公司名称")
else
cb="您填写的公司不存在,可能已经被删除。"
rs.close
set rs=nothing
end if
end if
%>
<script type="text/javascript" language="javascript">
function trim(str) {
return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
}
function GetResult_Load(level,shangjibianma)
{
if (typeof(shangjibianma)=="undefined"){shangjibianma=""}
var sel = document.getElementById("select"+level);
var getrs= new ActiveXObject("Microsoft.XMLHTTP");
getrs.open("post","getdateindb.asp?type=select&level="+level+"&shangjibianma="+shangjibianma,false);
getrs.send();
BuildSel_Load(getrs.responseText,sel);
var em="";
if (level==3)
{
level=level+1;
sel = document.getElementById("select"+level);
BuildSel_Load(em,sel);
}else if (level==2)
{
level=level+1
sel = document.getElementById("select"+level);
BuildSel_Load(em,sel);
level=level+1
sel = document.getElementById("select"+level);
BuildSel_Load(em,sel);
}
}
function BuildSel_Load(str,sel)
{
sel.options.length=0;
if (str!="")
{
var Tarrstr = new Array();
Tarrstr = str.split(",");
for(var i=0;i<Tarrstr.length;i=i+2)
{var j=i+1;
sel.options[sel.options.length]=new Option(Tarrstr[i],Tarrstr[j]);
}
}
var opobj = new Option("请选择","");
sel.add(opobj,0);
sel.selectedIndex = 0;
}
</script>
主要就是在tt和ie下的问题,火狐的问题我可以解决。
[img]http://blog.programfan.com/upfile/200706/20070621202850.jpg[/img]
[img]http://blog.programfan.com/upfile/200706/2007062120312.jpg[/img]
[img]http://blog.programfan.com/upfile/200706/20070621203836.jpg[/img]
代码分两段
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.divtl{
background-color:#E4EBF8;
vertical-align:top;
text-align:center;
font-size:12px;
font-weight:bold;
}
.div1 {
height:24px;
border-style:solid;
border:1px;
border-color:#000000;
font-weight:bold;
font-size:12px;
line-height:15px;
vertical-align:middle;
border-top:0px;}
.div2 {
height:24px;
border-style:solid;
border:1px;
border-color:#000000;
line-height:24px;
text-align:center;
vertical-align:middle;
font-size:12px;
border-top:0px;
border-left:0px;
}
.div3 {
border-style:solid;
border:1px;
border-color:#000000;
background-color:#FFFFFF;
text-align:center;
vertical-align:middle;
font-size:14px;
border-top:0px;
border-left:0px;
}
a:link { text-decoration:none;}
a:active { text-decoration:none}
a:hover { text-decoration:none;}
a:visited { text-decoration:none;}
.smalltxt { font: 12px Tahoma, Verdana, arial, helvetica,宋体 }
.div4{float: left;}
-->
</style></head>
<body bgcolor="#dbeffb">
<%
dsn="dsn=km11sc; uid=sa; pwd=111111;"
username=request.Cookies("ui")("name")
if isnull(username) or isempty(username) then response.Redirect("error.asp?message=请先登录")
set rs = Server.CreateObject("ADODB.recordset")
sql="select * from person where username='"&username&"'"
rs.open sql,dsn,1,1
if rs.eof or rs.bof then response.Redirect("error.asp?message=没有该用户")
if not (isnull(rs("其他联系方式1")) or isempty(rs("其他联系方式1"))) then
Set regEx = New RegExp
regEx.Pattern = "([^\|]+)\|([^\|]+)$"
set Matches=regEx.Execute(rs("其他联系方式1"))
for each Match in Matches
othern1=Match.SubMatches(0)
otherv1=Match.SubMatches(1)
next
Set regEx = Nothing
end if
if not (isnull(rs("其他联系方式2")) or isempty(rs("其他联系方式2"))) then
Set regEx = New RegExp
regEx.Pattern = "([^\|]+)\|([^\|]+)$"
set Matches=regEx.Execute(rs("其他联系方式2"))
for each Match in Matches
othern2=Match.SubMatches(0)
otherv2=Match.SubMatches(1)
next
Set regEx = Nothing
end if
cb=rs("所属公司")
if isnull(cb) or isempty(cb) then
cb="您没有填写"
else
set rs1 = Server.CreateObject("ADODB.recordset")
sql="select 公司名称 from company where 公司编号='"&cb&"'"
rs1.open sql,dsn,1,1
if not(rs1.eof or rs1.bof) then
cb=rs1("公司名称")
else
cb="您填写的公司不存在,可能已经被删除。"
rs.close
set rs=nothing
end if
end if
%>
<script type="text/javascript" language="javascript">
function trim(str) {
return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
}
function GetResult_Load(level,shangjibianma)
{
if (typeof(shangjibianma)=="undefined"){shangjibianma=""}
var sel = document.getElementById("select"+level);
var getrs= new ActiveXObject("Microsoft.XMLHTTP");
getrs.open("post","getdateindb.asp?type=select&level="+level+"&shangjibianma="+shangjibianma,false);
getrs.send();
BuildSel_Load(getrs.responseText,sel);
var em="";
if (level==3)
{
level=level+1;
sel = document.getElementById("select"+level);
BuildSel_Load(em,sel);
}else if (level==2)
{
level=level+1
sel = document.getElementById("select"+level);
BuildSel_Load(em,sel);
level=level+1
sel = document.getElementById("select"+level);
BuildSel_Load(em,sel);
}
}
function BuildSel_Load(str,sel)
{
sel.options.length=0;
if (str!="")
{
var Tarrstr = new Array();
Tarrstr = str.split(",");
for(var i=0;i<Tarrstr.length;i=i+2)
{var j=i+1;
sel.options[sel.options.length]=new Option(Tarrstr[i],Tarrstr[j]);
}
}
var opobj = new Option("请选择","");
sel.add(opobj,0);
sel.selectedIndex = 0;
}
</script>