<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>JSDom获取图层节点</title></head><body><script type="text/javascript"> function getUsername() { var dom=document.getElementById("username"); var name=dom.value; alert(name); }</script><input type="text" id="username"><input type="button" value="获取用户名" onclick="getUsername()"> </body></html>
原文地址:https://www.cnblogs.com/god1/p/12114650.html
时间: 2024-10-14 00:25:44