表单验证
验证名字是否为空
1 | if (x == null || x == "") { |
如果输入的值 x 不是数字或者小于 1 或者大于 10,则提示错误 Not a Number or less than one or greater than 10
1 | if (isNaN(x) || x < 1 || x > 10) { |
验证名字是否为空
1 | if (x == null || x == "") { |
如果输入的值 x 不是数字或者小于 1 或者大于 10,则提示错误 Not a Number or less than one or greater than 10
1 | if (isNaN(x) || x < 1 || x > 10) { |
1 | Accept: text/html, */*; q=0.01 |
Failed to load https://ebt.oss-cn-beijing.aliyuncs.com/PDF_SC/3b6ab81c-2054-43bb-b20a-3570a77569a4.pdf: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access.
getElementById() 返回对拥有指定 id 的第一个对象的引用。
getElementsByName() 返回带有指定名称的对象集合。
getElementsByTagName() 返回带有指定标签名的对象集合。
document.getElementsByClassName
document.querySelector()
方法返回文档中与指定选择器或选择器组匹配的第一个 html 元素Element
。 如果找不到匹配项,则返回null
。
查找第一个匹配 class 属性的 html 元素
这个例子中,会返回当前文档中第一个类名为 “myclass” 的元素:
1 | var el = document.querySelector(".myclass") |
Office 现在是 Microsoft 365。功能完备且收费
下载并安装 Office Tool Plus
在部署选项卡中添加产品,这里我选择了 Office 家庭和学生版 2016 - HomeStudentRetail
在激活选项卡中 -> 许可证管理 -> 安装许可证 -> Office Mondo 2016-批量许可证 和 kms 管理设置主机为 kms.loli.beer
在激活选项卡中 -> 许可证管理 -> 点击激活 以 完成激活
在该单元格输入函数 =IF(A2=B2,"一致","有差异")
,函数意思:如果 A2 列数字和 B2 列数字相同就在单元格显示“是”,反之即显示“否”,自己可根据自己的实际情况进行相应的调整。
用 wps 打开后可以文件 -> 导出为 pdf