多类型登陆一般是采用javascript的跳转功能来实现,例如pconline是这样的:
<form method=”post” target=_blank action=”
http://itbbs.pconline.com.cn/common/user/login.jsp”
name=”bbs”>
<input type=”hidden” name=”username” value=”">
<input type=”hidden” name=”password” value=”">
<input type=hidden name=return value=”http://itbbs.pconline.com.cn/main.html” >
</form>
<form target=_blank method=”post” action=”http://emember.pconline.com.cn/member/login.do” name=”cpy”>
<input type=”hidden” name=”username” value=”">
<input type=”hidden” name=”password” value=”">
</form>
<form target=_blank method=”post” action=”http://pcjob.pconline.com.cn/pcjob/person/person_login.jsp” name=”person1″>
<input type=”hidden” name=”username” value=”">
<input type=”hidden” name=”password” value=”">
</form>
<tr>
<form id=mainform method=”get” onSubmit=”return PConlineLogin(this);” >
<td width=”295″>
<select name=online id=online onChange=”url.href=u_reg[value]” class=pt9 style=”font-size:12px;”>
<option value=”1″ selected>论坛</option>
<option value=”2″>商家</option>
<option value=”3″>求职</option>
</select>
用户
<input name=username size=12 style=”HEIGHT: 20px;” class=pt9 value=”guest” onClick=”if(this.value==’guest’)this.value=”;password.value=”” >
密码
<input name=password size=12 style=”HEIGHT: 20px;” class=pt9 type=”PASSWORD” value=”guest”>
</td>
<td width=”53″ align=”center”>
<input type=image src=http://www.pconline.com.cn/images/bot_login.gif width=”42″ height=”18″ name=”image”>
</td>
</form>
<td width=”53″ align=”center”>
<script language=”JavaScript”>
var u_guest= new Array(3);
var u_reg= new Array(3);
u_guest[1]=”http://itbbs.pconline.com.cn/main.html“
u_guest[2]=”http://www.pconline.com.cn/yp/“
u_guest[3]=”http://pcjob.pconline.com.cn/pcjob/person/person_search_result.jsp?publishdate=30“
u_reg[1]=”http://itbbs.pconline.com.cn/common/user/apply/register.jsp?return=../../../index.html“
u_reg[2]=”http://cyp.pconline.com.cn/cyp/register.jsp“
u_reg[3]=”http://pcjob.pconline.com.cn/pcjob/user_reg.htm“
function PConlineLogin()
{
if (mainform.username.value == “” || mainform.username.value == “guest”)
{
window.open(u_guest[mainform.online.value]);
return false;
}
if (mainform.password.value == “”)
{
alert(“请输入您的密码”);
mainform.password.focus();
return false;
}
if (mainform.online.value==”1″){
bbs.username.value =mainform.username.value;
bbs.password.value =mainform.password.value;
bbs.submit();
}
if (mainform.online.value==”2″){
cpy.username.value =mainform.username.value;
cpy.password.value =mainform.password.value;
cpy.submit();
}
if (mainform.online.value==”3″){
person1.username.value =mainform.username.value;
person1.password.value =mainform.password.value;
person1.submit();
}
return false;
}
document.write (” <a id=url href=’http://itbbs.pconline.com.cn/common/user/apply/register.jsp?return=../../../index.html’ target=_blank><img src=http://www.pconline.com.cn/images/bot_reg.gif width=42 height=18 border=0></a>”);
</script>
我想在主页中插入用vbscript编写的图片轮显程序,确老是冲突。网上一个较好的图片轮显程序是这样的:
<HTML>
<HEAD>
<TITLE>夜雨休闲 – 幻灯片播放</TITLE>
<META HTTP-EQUIV=”Content-Type” CONTENT=”text/html; charset=gb2312″>
<LINK HREF=”Images/Style.css” REL=”stylesheet”>
</HEAD>
<SCRIPT language=”VBScript”>
Dim FileList,FileListArr
FileList = “001.jpg,002.jpg,003.jpg,004.jpg,005.jpg”
FileListArr = Split(FileList,”,”)
Dim CanPlay
CanPlay = CInt(Split(Split(navigator.appVersion,”;”)(1),” “)(2))>5
Dim FilterStr
FilterStr = “RevealTrans(duration=2,transition=23)”
FilterStr = FilterStr + “;BlendTrans(duration=2)”
If CanPlay Then
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.Pixelate(,enabled=false,duration=2,maxSquare=25)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.GradientWipe(duration=2,gradientSize=0.25,motion=forward )”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.Stretch(duration=2,stretchStyle=PUSH)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.Wheel(duration=2,spokes=16)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.RandomDissolve(duration=2)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.Spiral(duration=2,gridSizeX=50,gridSizeY=50)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.Slide(duration=2,bands=1,slideStyle=SWAP)”
FilterStr = FilterStr + “;progid:DXImageTransform.Microsoft.RadialWipe(duration=2,wipeStyle=CLOCK)”
Else
Msgbox “幻灯片播放具有多种动态图片切换效果,但此功能需要您的浏览器为IE5.5或以上版本,否则您将只能看到部分的切换效果。”,64
End If
Dim FilterArr
FilterArr = Split(FilterStr,”;”)
Dim PlayImg_M
PlayImg_M = 5 * 1000 ‘切换时间(毫秒)
Dim I
I = 1
Sub ChangeImg
Do While FileListArr(I)=”"
I = I + 1
If I>UBound(FileListArr) Then I = 0
Loop
Dim J
If I>UBound(FileListArr) Then I = 0
Randomize
J = Int(Rnd * (UBound(FilterArr)+1))
Img.style.filter = FilterArr(J)
Img.filters(0).Apply
Img.Src = FileListArr(I)
Img.filters(0).play
I = I + 1
If I>UBound(FileListArr) Then I = 0
TempImg.Src = FileListArr(I)
SetTimeout “ChangeImg”,PlayImg_M
End Sub
</SCRIPT>
<BODY BGCOLOR=”#000000″>
<table width=”401″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<form method=”post” target=_blank action=”
http://itbbs.pconline.com.cn/common/user/login.jsp”
name=”bbs”>
<input type=”hidden” name=”username” value=”">
<input type=”hidden” name=”password” value=”">
<input type=hidden name=return value=”http://itbbs.pconline.com.cn/main.html” >
</form>
<form target=_blank method=”post” action=”http://emember.pconline.com.cn/member/login.do” name=”cpy”>
<input type=”hidden” name=”username” value=”">
<input type=”hidden” name=”password” value=”">
</form>
<form target=_blank method=”post” action=”http://pcjob.pconline.com.cn/pcjob/person/person_login.jsp” name=”person1″>
<input type=”hidden” name=”username” value=”">
<input type=”hidden” name=”password” value=”">
</form>
<tr>
<form id=mainform method=”get” onSubmit=”return PConlineLogin(this);” >
<td width=”295″>
<select name=online id=online onChange=”url.href=u_reg[value]” class=pt9 style=”font-size:12px;”>
<option value=”1″ selected>论坛</option>
<option value=”2″>商家</option>
<option value=”3″>求职</option>
</select>
用户
<input name=username size=12 style=”HEIGHT: 20px;” class=pt9 value=”guest” onClick=”if(this.value==’guest’)this.value=”;password.value=”” >
密码
<input name=password size=12 style=”HEIGHT: 20px;” class=pt9 type=”PASSWORD” value=”guest”>
</td>
<td width=”53″ align=”center”>
<input type=image src=http://www.pconline.com.cn/images/bot_login.gif width=”42″ height=”18″ name=”image”>
</td>
</form>
<td width=”53″ align=”center”>
<script language=”JavaScript”>
var u_guest= new Array(3);
var u_reg= new Array(3);
u_guest[1]=”http://itbbs.pconline.com.cn/main.html“
u_guest[2]=”http://www.pconline.com.cn/yp/“
u_guest[3]=”http://pcjob.pconline.com.cn/pcjob/person/person_search_result.jsp?publishdate=30“
u_reg[1]=”http://itbbs.pconline.com.cn/common/user/apply/register.jsp?return=../../../index.html“
u_reg[2]=”http://cyp.pconline.com.cn/cyp/register.jsp“
u_reg[3]=”http://pcjob.pconline.com.cn/pcjob/user_reg.htm“
function PConlineLogin()
{
if (mainform.username.value == “” || mainform.username.value == “guest”)
{
window.open(u_guest[mainform.online.value]);
return false;
}
if (mainform.password.value == “”)
{
alert(“请输入您的密码”);
mainform.password.focus();
return false;
}
if (mainform.online.value==”1″){
bbs.username.value =mainform.username.value;
bbs.password.value =mainform.password.value;
bbs.submit();
}
if (mainform.online.value==”2″){
cpy.username.value =mainform.username.value;
cpy.password.value =mainform.password.value;
cpy.submit();
}
if (mainform.online.value==”3″){
person1.username.value =mainform.username.value;
person1.password.value =mainform.password.value;
person1.submit();
}
return false;
}
document.write (” <a id=url href=’http://itbbs.pconline.com.cn/common/user/apply/register.jsp?return=../../../index.html’ target=_blank><img src=http://www.pconline.com.cn/images/bot_reg.gif width=42 height=18 border=0></a>”);
</script>
</td>
</tr>
</table>
<TABLE WIDTH=”100%” height=”100%” BORDER=”0″ CELLSPACING=”0″ CELLPADDING=”0″>
<TR ID=”NoScript”>
<TD Align=”Center” Style=”Color:White”>对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>
</TR>
<TR Style=”Display:none” ID=”CanRunScript”>
<TD HEIGHT=”100%” Align=”Center” vAlign=”Center”>
<Img ID=”Img” Border=”0″ >
</TD>
</TR>
<TR Style=”Display:none”>
<TD><Img ID=”TempImg” Border=”0″></TD>
</TR>
</TABLE>
<Script Language=”VBScript”>
NoScript.Style.Display = “none”
CanRunScript.Style.Display = “”
Img.Src = FileListArr(0)
SetTimeout “ChangeImg”, PlayImg_M
</Script>
这两个script单独可以正常运行,合在一起就有冲突了。找了好久,终于找到了解决的方法。那就是找javascript写的图片轮显程序。(废话嘛)
找了两天,终于找到了,真是让人高兴的事情。