javascript - JavaScript,“绑定”是什么意思,而不是“绑定”?document.binde.tagname...?
问题描述
我的 JS 代码中有一些带有 的行binde
,它是什么?为什么它有效,它是什么意思?
例如,type="checkbox"
:
if (document.binde.nameofthecheckbox.checked)
{
//...its true whens checked and do the code
}
或者
somevar = document.binde.somehtmltagname.value;
somevar
获取“somehtmltagname”的值
没有人能回答我,我只听说“以前从未见过这样的事情”。我很高兴知道它是什么,而不仅仅是因为它有效而使用它。
解决方案
它并不为人所知,但可能会这样document
定义 HTML 元素,如果页面上有一个,它将指向那个。id
document[HTMLElement.ID]
<input id="binde">
如果没有,请尝试记录它:
console.log(document.binde)
推荐阅读
- git - git-ls-files 中 --others 和 --other 之间的区别
- python - Scipy.interpolate 和 matplotlib 中的 3D 表面 - 数据似乎在轴内旋转?
- webpack - ESLint 不是构造函数
- azure-active-directory - 在 keycloak id_token 中获取 Azure 组信息
- octobercms - 如何获取给定页面的路径?
- identityserver4 - Razor Pages 应用程序未重定向到 IdentityServer4
- module - Terraform - 单一资源模块总是不好的吗?
- jboss - org.zkoss.zk.ui.http.DHtmlLayoutServlet 无法转换为 javax.servlet.Servlet
- swift - 无法将多个图像上传到服务器 Alamofire
- java - 通过网络聊天在本地部署 botbuilder 聊天机器人的步骤