-1
也许我所表达的问题的标题不是很清楚。让我说更具体一点。我有一些HTML代码如下:jquery如何判断from中的数组是否为空
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="js/jquery.js"></script>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data" onsubmit="return checkpost();">
<p> <input name="picture[]" type="file" accept="image/gif, image/jpeg" />
</p>
<p> <input name="picture[]" type="file" accept="image/gif, image/jpeg" />
</p>
<p> <input name="picture[]" type="file" accept="image/gif, image/jpeg" />
</p>
<p> <input id="submit" type="submit" value="submit" /></p>
</form>
</body>
<script>
function checkpost() {
}
</script>
</html>
对于我的PHP编程,我要检查,如果有选择的3张图片,但我不知道如何检查,在我的js代码。 对不起,我可怜的英语使问题不太清楚,但感谢您的帮助!
是否必须是明确的jQuery,或将普通的JavaScript是VAID答案吗?另外,你到目前为止尝试过什么? – gabe3886