函数出错了,提示是符号出了问题,但又找不到~郁闷中......

Dadimamiilove 2009-10-27 02:30:17

<script type="text/javascript">
function setid()
{ if(!window.form11.imgcou.value)
window.form11.imgcou.value=1;
aa=window.form11.imgcou.value;
if (aa>100) file://限制为100个文件
{aa=100;
window.form11.imgcou.value=100;
}
str1=\\
for(j=1;j<=aa;j++)
str1+=\<br> <font color="#003333" size="2" id="shuang">图片\+j+\:</font><input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"><br> <font color="#003333" size="2">图片说明\+j+\:</font> <input name="txt\+j+\" type="text" class="xian" style="height:20;width:200;"> <br><br>\;
window.imgid.innerHTML=str1;
}
</script>

...全文
93 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
sun58300 2009-10-27
  • 打赏
  • 举报
回复
我还没看懂
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 linux1300 的回复:]
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#
代码不完整啊
<font color="#都没有结束
[/Quote]
这是完整的~~
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#003333" size="2">图片说明\+j+\: </font> <input name="txt\+j+\" type="text" class="xian" style="height:20;width:200;"> <br> <br>\'';
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 anbs01 的回复:]
前面加上var试试
[/Quote]
还是

网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.1)
时间戳: Tue, 27 Oct 2009 08:01:35 UTC


消息: 无效字符
行: 15
字符: 12
代码: 0
URI: http://localhost/原创/gjimg.asp


anbs01 2009-10-27
  • 打赏
  • 举报
回复
前面加上var试试
anbs01 2009-10-27
  • 打赏
  • 举报
回复
str1没有定义
linux1300 2009-10-27
  • 打赏
  • 举报
回复
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#
代码不完整啊
<font color="#都没有结束
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 linux1300 的回复:]
最后一个
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#';
\'注释掉了'

[/Quote]
是可以了正常显示了~但~
网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.1)
时间戳: Tue, 27 Oct 2009 07:32:14 UTC


消息: 无效字符
行: 15
字符: 9
代码: 0
URI: http://localhost/原创/gjimg.asp
linux1300 2009-10-27
  • 打赏
  • 举报
回复
最后一个
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#';
\'注释掉了'
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 anbs01 的回复:]
提示出错那一行是哪里啊?
[/Quote]
说是无效字符~~
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
str1=\\
这个~~
anbs01 2009-10-27
  • 打赏
  • 举报
回复
提示出错那一行是哪里啊?
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
这是我的代码~

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图片上传</title>
<script language="JavaScript">
function setid()
{ if(!window.form11.imgcou.value)
window.form11.imgcou.value=1;
aa=window.form11.imgcou.value;
if (aa>100) file://限制为100个文件
{aa=100;
window.form11.imgcou.value=100;
}
str1=\\
for(j=1;j<=aa;j++)
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#003333" size="2">图片说明\+j+\: </font> <input name="txt\+j+\" type="text" class="xian" style="height:20;width:200;"> <br> <br>\';
window.imgid.innerHTML=str1;
}
</script>
</head>
<body >
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0">

<tr>
<td height="25" colspan="2" align="center"><font color="#FF0000" size="2"><%=session("errmess11")%></font></td>
</tr>
<tr>
<td width="67%" height="25" align="right" ><font color="#003333" size="2">请输入上传图片的张数:</font>
</td>
<td width="33%" height="25" align="left" > <form method="post" action="" name="form11" id="form11">
<input name="imgcou" id="imgcou" type="text" style="height:20;width:20;" class="xian">

<input name="tsd" type="button" value="设定" style="height:20;width:50;" class="xian" onClick="setid();">
</form></td>
</tr>
<form name="SCM" action="khimg.asp" method="post" enctype="multipart/form-data">
<tr>
<td colspan="2" align="center" id="imgid"><br> <font color="#003333" size="2" id="shuang">图片1:</font>
<input name="file1" type="file" class="xian" style="height:20;width:221;">
<br> <font color="#003333" size="2">图片说明1:</font> <input name="txt1" type="text" class="xian" style="height:20;width:200;">
<br></td>
</tr>
<tr>
<td align="center" height="30" ></td>
<td align="left" ><input type="submit" name="FMDJ" value="提交" style="height:20;width:40;" class="xian">
<input type="reset" name="Submit2" value="重设" style="height:20;width:40;" class="xian"></td>
</tr>
</form>
</table>
</center>
</body>
</html>

Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 anbs01 的回复:]
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#003333" size="2">图片说明\+j+\:¡­
[/Quote]
不行的~
anbs01 2009-10-27
  • 打赏
  • 举报
回复
str1+='\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#003333" size="2">图片说明\+j+\: </font> <input name="txt\+j+\" type="text" class="xian" style="height:20;width:200;"> <br> <br>\';
Dadimamiilove 2009-10-27
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 anbs01 的回复:]
str1+=\ <br> <font color="#003333" size="2" id="shuang">图片\+j+\: </font> <input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"> <br> <font color="#003333" size="2">图片说明\+j+\: </font> <input name="txt\+j+\" type="text" class="xian" style="height:20;width:200;"> <br> <br>\;

字符串两端应加上''
[/Quote]
哪个字符串?我找了很久了~没找到~~
anbs01 2009-10-27
  • 打赏
  • 举报
回复
str1+=\<br> <font color="#003333" size="2" id="shuang">图片\+j+\:</font><input name="file\+j+\ " type="file" class="xian" style="height:20;width:221;"><br> <font color="#003333" size="2">图片说明\+j+\:</font> <input name="txt\+j+\" type="text" class="xian" style="height:20;width:200;"> <br><br>\;

字符串两端应加上''

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧