【Ajax-javaScript】1、javascript的基础学习
发布时间:2020-12-16 00:28:09 所属栏目:百科 来源:网络整理
导读:!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"html head titlegetElementById.html/title meta http-equiv="keywords" content="keyword1,keyword2,keyword3" meta http-equiv="description" content="this is my page" meta http-equiv="
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>getElementById.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head> <body> <form name="form1" action="test.html" method="post" > <input type="text" name="username" value="国庆六十周年_1" id="tid" onchange="" > <input type="button" name="ok" value="保存1" /> </form> </body> <script type="text/javascript"> //输出<input type="text" name="username" value="国庆六十周年_1" id="tid">标签value属性的值 var inputElement=document.getElementById("tid"); alert(inputElement.value); //输出<input type="text" name="username" value="国庆六十周年_1" id="tid">标签type属性的值 alert(inputElement.type); </script> </html> </pre><pre name="code" class="html">
就是很简单的得到相应的标签!!! 大家随意看一看就可以了 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |