手机
当前位置:查字典教程网 >网页设计 >HTML5教程 >html5 获取input内容
html5 获取input内容
摘要:html5获取input内容vard=document.getelementbyid('debug');[].foreach.call(do...

 <!doctype html> 

<html> 
<head> 
<meta charset=utf-8 /> 
<title>html5 获取input内容</title> 
</head> 
<body> 
  <input type="email" /> 
  <input type="tel" /> 
  <input type="range" /> 
  <input type="url" /> 
  <input type="number" /> 
  <input type="tel" /> 
  <input type="date" /> 
  <input type="datetime" /> 
  <ol id="debug"></ol>

<script>var d = document.getelementbyid('debug');
[].foreach.call(document.queryselectorall('input'), function (el) {
  d.innerhtml += '<li>' + el.type;
  d.innerhtml += el.getattribute('type')  + '</li>';
});
</script>  
</body> 
</html>

【html5 获取input内容】相关文章:

html5小技巧之通过document.head获取head元素

html5读取本地文件示例代码

html5表单及新增的改良元素详解

html5入门之设计原理

Html5 语法与规则简要概述

html5 兼容IE6结构的实现代码

html5 canvas绘制矩形和圆形的实例代码

html5 input属性使用示例

html5 CSS过度-webkit-transition使用介绍

Html5 web本地存储实例详解

精品推荐
分类导航