查看: 809|回复: 11
|
Javascript 问题
[复制链接]
|
|
发表于 11-7-2006 06:22 PM
|
显示全部楼层
可以放在[code][/code]里面吗?
很多mistakes啊。。。还有你的local variable和global variable要弄清楚一点..... |
|
|
|
|
|
|
|
楼主 |
发表于 12-7-2006 10:02 AM
|
显示全部楼层
有人可以帮我吗? 很急....我的return.....好象不能function... return true 因该可以帮我去另一个page... |
|
|
|
|
|
|
|
发表于 12-7-2006 03:10 PM
|
显示全部楼层
- function check()
- {
- ReturnVal = 0;
- for (var i = 1; i<document.ProdUpload.elements.length; i++)
- {
- if ((document.ProdUpload.elements.type == "file")) //document.ProdUpload.elements 应该是ARRAY?
- {
- ReturnVal = 1;
- a = i - 2;
- b = i - 1;
- ImageValue = document.ProdUpload.elements.value; //document.ProdUpload.elements 应该是ARRAY?
- ProdName = document.ProdUpload.elements[a].value;
- ProdDescp = document.ProdUpload.elements.value; //document.ProdUpload.elements 应该是ARRAY?
-
- if ((!(ImageValue == "")))
- {
- ProdCheck(ProdName);
-
- if (count == 1 )
- {
- document.ProdUpload.elements[a].focus();
- return false;
- }
- }
- }
- }
-
- if (count=="0") // count 应该是 integer?
- {
- alert("there");
- return true;
- alert("hello");
- }
- }
- function ProdCheck(str)
- {
- count = 0;
- if (str == "")
- {
- count = 1;
- alert("lease enter Product Name")
- document.ProdUpload.elements[a].focus();
- return false;
- }
- return true;
- }
复制代码
可以把FORM都UPLOAD上来看看吗?。 |
|
|
|
|
|
|
|
楼主 |
发表于 12-7-2006 03:13 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 12-7-2006 04:28 PM
|
显示全部楼层
document.ProdUpload.elements 是 ARRAY 来的。。
document.ProdUpload.elements.type 应该写成 document.ProdUpload.elements.type。。。
document.ProdUpload.elements.value 也一样。 |
|
|
|
|
|
|
|
发表于 12-7-2006 04:33 PM
|
显示全部楼层
SORRY 误会。
我不懂原来
是SHOW没有动西的。。。 |
|
|
|
|
|
|
|
楼主 |
发表于 12-7-2006 05:12 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 12-7-2006 05:34 PM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 12-7-2006 06:04 PM
|
显示全部楼层
yes...如过我没有放nested if 我就可以另一个page....先在不能 |
|
|
|
|
|
|
|
发表于 13-7-2006 02:45 PM
|
显示全部楼层
试试看 onsubmit="return check(this); |
|
|
|
|
|
|
|
楼主 |
发表于 14-7-2006 09:25 AM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|