博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
每天一个JavaScript实例-检測表单数据
阅读量:7231 次
发布时间:2019-06-29

本文共 844 字,大约阅读时间需要 2 分钟。

每天一个JavaScript实例-检測表单数据

!! console.log(fields); if(fields.length > 0){ generateAlert("You have incorrect fields entries that must be fixed before you can submit this form"); return false; } } </script> </head> <body> <form id = "testform"> <div> <label for="firstfield">*first Field:</label><br /> <input id="firstfield" name = "firstfield" type = "text" aria-required = "true" /> </div> <div> <label for="secondfield">Second Field:</label><br /> <input id="secondfield" name = "secondfield" type = "text" /> </div> <div> <label for="thirdfield">Third Field(numeric):</label><br /> <input id="thirdfield" name = "thirdfield" type = "text" /> </div> <div> <label for="fourthfield">Fourth Field:</label><br /> <input id="fourthfield" name = "fourthfield" type = "text" /> </div> <input type="submit" value = "Send Data" /> </form> </body> </html>

转载地址:http://bdpfm.baihongyu.com/

你可能感兴趣的文章
适配低内存手机让app存在多个进程
查看>>
BW中DSO的分类
查看>>
echo -en
查看>>
Mysql 复制(Replication)实现
查看>>
我的友情链接
查看>>
jar生成exe可执行的程序
查看>>
date 转化为 指定格式的String
查看>>
使用virtualbox安装RHEL 6.2+Oracle 11g
查看>>
系统的域名服务
查看>>
MySQL 复制表结构
查看>>
《Effective C#》条款8:确保0为值类型的有效状态
查看>>
动态迁移应用服务器(Esxi 动态迁移技术,业务不间断,在线迁移)
查看>>
systemd coding style
查看>>
warning: control reaches end of non-void function
查看>>
Tkinter, a Gui for python
查看>>
android开发之webservice介绍
查看>>
纯js页面跳转整理
查看>>
目标:嗯,每天进步一点点,每周坚持写一点
查看>>
ros 安装教程
查看>>
使用charles抓包https,配置了证书,还是乱码的解决方案
查看>>