【发布时间】:2014-11-23 19:13:21
【问题描述】:
我需要能够检查表单域中的第一个条目是否是字符。 类似于下面的东西(但用'magic'替换'somethinginhere'。 在此先感谢
<script type="text/javaScript">
function Validator() {
if (document.theForm.Code.value!= "<somethinginhere>") {
alert("Code needs to start with a letter");
}
}
</script>
【问题讨论】:
-
你有类似的东西[这里][1] [1]:stackoverflow.com/questions/9862761/…
标签: javascript forms validation field