var LnzID;
function popSignFlow(isLogin,LId) {
popSign(isLogin);
LnzID=LId;
document.body.style.overflow = "hidden";
alert(LnzID);
//LnzID这值已经得到了
}var sign_in_flow = '<form action="../222.asp?Id='+LnzID+'" method="post">';这样不行么
function popSignFlow(isLogin,LId) {
popSign(isLogin);
LnzID=LId;
document.body.style.overflow = "hidden";
alert(LnzID);
//LnzID这值已经得到了
}var sign_in_flow = '<form action="../222.asp?Id='+LnzID+'" method="post">';这样不行么
popSign(isLogin);
LnzID=LId;
document.body.style.overflow = "hidden";
return (LnzID);
//LnzID这值已经得到了
}
var sign_in_flow = '<form action="../222.asp?Id=+popSignFlow("aaa","bbb")+" method="post">';
var LnzID;
popSignFlow(isLogin,LId)//使用前调用下函数
var sign_in_flow = '<form action="../222.asp?Id='+LnzID+'" method="post">';
var sign_in_flow = '<form action="../222.asp?Id='+LnzID+'" method="post">';
这是调用不到他的变量值
还有说明下
sign_in_flow
这个变量不在任何方法内只在<script></script>里
var sign_in_flow = '<form action="../222.asp?Id='+LnzID+'" method="post">';这个不在<script>里,那怎么执行啊,不是直接打在页面上了?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>aaaa</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center>
<div class="k760" style="margin-top:10px;"><span class="left" style="margin-left:4px;"><a href="index.asp"></a></span></div>
<table width="720" border="1" cellpadding="0" bordercolor="#AB8503" style="margin:10px 0 10px 0; border-collapse:collapse" class="lian1">
16<Br/>
<form action="MemberManager/ModUserC.asp" method="post" name="ModifyCar" id="ModifyCar" enctype="multipart/form-data">
<tr align="center" bgcolor="#FFFDF7">
<td height="24" ><span id="previewImagew0"><img src="../UpLoadFile/2007823111520.jpg" width=60 height=40 align=absmiddle /></span><br>
<input name="UpCarImage" type="file" size="1" onChange="document.getElementById('previewImagew'+0).innerHTML = '<img src=\''+this.value+'\' width=60 height=40 align=absmiddle>';"></td>
<td><input name="Lnz_Car_Model" type="text" size="7" value="本田" readonly/>
</td>
<td><input name="Lnz_Car_Name" type="text" size="7" value="aa" readonly/>
</td>
<td><input name="Lnz_Car_Day" type="text" size="7" value="22" /></td>
<td><input name="Lnz_Car_Month" type="text" size="7" value="33" /></td>
<td><input name="Lnz_Car_Surpasses" type="text" size="6" value="44" /></td>
<td><input name="Lnz_Car_Deposit" type="text" size="6" value="55" /></td>
<td><input name="Lnz_Car_Situation" type="text" size="6"value="66" /></td>
<td><br/>
<br/>
<a herf="#" onclick="popSignFlow(1,16);" style="cursor:hand;">详细资料</a></td>
</tr>
</form>
17<Br/>
<form action="MemberManager/ModUserC.asp" method="post" name="ModifyCar" id="ModifyCar" enctype="multipart/form-data">
<tr align="center" bgcolor="#FFFDF7">
<td height="24" ><span id="previewImagew1"><img src="../UpLoadFile/2007824120429.gif" width=60 height=40 align=absmiddle /></span><br>
<input name="UpCarImage" type="file" size="1" onChange="document.getElementById('previewImagew'+1).innerHTML = '<img src=\''+this.value+'\' width=60 height=40 align=absmiddle>';"></td>
<td><input name="Lnz_Car_Model" type="text" size="7" value="宝马" readonly/>
</td>
<td><input name="Lnz_Car_Name" type="text" size="7" value="oo" readonly/>
</td>
<td><input name="Lnz_Car_Day" type="text" size="7" value="erwe" /></td>
<td><input name="Lnz_Car_Month" type="text" size="7" value="wrwe" /></td>
<td><input name="Lnz_Car_Surpasses" type="text" size="6" value="wer" /></td>
<td><input name="Lnz_Car_Deposit" type="text" size="6" value="wer" /></td>
<td><input name="Lnz_Car_Situation" type="text" size="6"value="ddd" /></td>
<td><a herf="#" onclick="popSignFlow(1,17);" style="cursor:hand;">详细资料</a></td>
</tr>
</form>
</table>
</div>
<script>
var LnzID;
function popSignFlow(isLogin,LId) {
popCoverDiv();
popSign(isLogin);
LnzID=LId;
document.body.style.overflow = "hidden";
alert(LnzID);
if(isLogin) {
G("Displacement").focus();
} else {
G("old_pwd").focus();
}
} function G(id){
return document.getElementById(id);
};
function GC(t){
return document.createElement(t);
};
String.prototype.trim = function(){
return this.replace(/(^\s*)|(\s*$)/g, '');
};
function isIE(){
return (document.all && window.ActiveXObject && !window.opera) ? true : false;
}
var loginDivWidth = 500;
var sign_in_flow = "<form action=\"../222.asp?Id="+LnzID+"\" method=\"post\">"
+'<table width="500">'
+'<tr>'
+'<td colspan="4" style="background:#FF9900;">详细资料</td>'
+'</tr>'
+'<tr>'
+'<td>排量</td>'
+'<td><input type="text" id="Displacement" maxlength="64" size="20"/></td>'
+'<td>排放标准</td>'
+'<td><input type="text" id="Mstandards" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>变速形式</td>'
+'<td><input type="text" id="Vforms" maxlength="64" size="20"/></td>'
+'<td>燃油供给方式</td>'
+'<td><input type="text" id="Fmethod" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>燃油标号</td>'
+'<td><input type="text" id="Flabeling" maxlength="64" size="20"/></td>'
+'<td>满油行驶里程</td>'
+'<td><input type="text" id="Foil" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>油箱容积</td>'
+'<td><input type="text" id="Fcapacity" maxlength="64" size="20"/></td>'
+'<td>油耗</td>'
+'<td><input type="text" id="Oconsumption" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>座位数</td>'
+'<td><input type="text" id="Seats" maxlength="64" size="20"/></td>'
+'<td>长度</td>'
+'<td><input type="text" id="Length" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>宽度</td>'
+'<td><input type="text" id="Width" maxlength="64" size="20"/></td>'
+'<td>高度</td>'
+'<td><input type="text" id="Height" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>后备箱容积</td>'
+'<td><input type="text" id="Tvolume" maxlength="64" size="20"/></td>'
+'<td>排档位置</td>'
+'<td><input type="text" id="Tposition" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>车门数</td>'
+'<td><input type="text" id="Adoors" maxlength="64" size="20"/></td>'
+'<td>安全配置</td>'
+'<td><input type="text" id="SConfige" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>娱乐设备</td>'
+'<td><input type="text" id="Entertainment" maxlength="64" size="20"/></td>'
+'<td>百公里加速</td>'
+'<td><input type="text" id="Accelerate" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr>'
+'<td>最高时速</td>'
+'<td><input type="text" id="Mspeed" maxlength="64" size="20"/></td>'
+'<td>同档车型</td>'
+'<td><input type="text" id="Mstalls" maxlength="64" size="20"/></td>'
+'</tr>'
+'<tr align="left">'
+'<td colspan="4"> 推荐用途 <input type="text" id="Suse" maxlength="64" size="30"/></td>'
+'</tr>'
+'<tr>'
+'<td colspan="4"><input type="submit" id="submit" value="提交"/> <input type="button" value="返回" onclick="cancelSign();"/></td>'
+'</tr>'
+'</table>'
+'</form>';
function loadSignInFlow(){
G("sign_div").innerHTML = sign_in_flow;
G("Displacement").focus();
};
function cancelSign(){
G("sign_div").style.display = 'none';
G("cover_div").style.display = 'none';
document.body.style.overflow = '';
};
function checkEmail(){
if((G("sign_email").value.indexOf('@')<=0)||(G("sign_email").value.indexOf('.')<=0)){
return '<div style="color:#FF0000";">Sorry, unrecognized e_mail.</div>';
}
return '';
}
function checkPwd(){
if(G("sign_pwd").value.trim() == ''){
return '<div style="color:#FF0000";">Password field is required.</div>';
}
return '';
}
function checkRePwd(){
if(G("sign_pwd").value.trim() != G("sign_repwd").value.trim()){
return '<div style="color:#FF0000";">The specified passwords do not match.</div>';
}
return '';
}
function signFlow(isSignIn){
var error = checkEmail();
var htmlText = null;
if (isSignIn == 1) {
if (error == ''){
error = checkPwd();
}
htmlText = sign_in_flow;
} else if (isSignIn == 0) {
if (error == ''){
error = checkPwd();
if (error == ''){
error = checkRePwd();
}
}
htmlText = sign_up_flow;
} else if (isSignIn == 2) {
htmlText = forget_pwd_flow;
}
var eMailValue = G("sign_email").value.trim();
if (error == '') {
} else {
G("sign_div").innerHTML = error + htmlText;
G("sign_email").value = eMailValue;
}
};
function popCoverDiv(){
if (G("cover_div")) {
G("cover_div").style.display = '';
} else {
var coverDiv = GC('div');
document.body.appendChild(coverDiv);
coverDiv.id = 'cover_div';
with(coverDiv.style) {
position = 'absolute';
background = '#CCCCCC';
left = '0px';
top = '0px';
var bodySize = getBodySize();
width = bodySize[0] + 'px'
height = bodySize[1] + 'px';
zIndex = 98;
if (isIE()) {
filter = "Alpha(Opacity=60)";
} else {
opacity = 0.6;
}
}
}
}
function getBodySize(){
var bodySize = [];
with(document.documentElement) {
bodySize[0] = (scrollWidth>clientWidth)?scrollWidth:clientWidth;
bodySize[1] = (scrollHeight>clientHeight)?scrollHeight:clientHeight;
}
return bodySize;
}
function popSign(isLogin){
if (G("sign_div")) {
G("sign_div").style.display = '';
} else {
var signDiv = GC('div');
document.body.appendChild(signDiv);
signDiv.id = 'sign_div';
signDiv.align = "center";
signDiv.onkeypress = function(evt){
var e = window.event?window.event:evt;
if (e.keyCode==13 || e.which==13) {
if (G("sign_button")) {
G("sign_div").focus();
G("sign_button").click();
}
}
};
with (signDiv.style) {
position = 'absolute';
left = (document.documentElement.clientWidth - loginDivWidth)/1.1 + 'px';
top = (document.documentElement.clientHeight - 310)/2 + 'px';
width = loginDivWidth + 'px';
zIndex = 99;
background = '#FFFFFF';
border = '#66CCFF solid 1px';
}
}
if(isLogin) {
G("sign_div").innerHTML = sign_in_flow;
} else {
G("sign_div").innerHTML = change_pwd_flow;
}
}
</script>
</center>
</body>
</html>
以上的都是源码,为了这个问题搞了一上午,实在搞不懂哪里出问题了,所以没办法才麻烦下大家
var sign_in_flow = "<form name="newForm" action=\"../222.asp?Id="+LnzID+"\" method=\"post\">"
LnzID=LId;这句也要改
newForm.action="../222.asp?Id="+LId
还有下面的那个sign_in_flow参数没调用啊