手机
当前位置:查字典教程网 >网页设计 >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使用canvas绘制文字特效

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

HTML5 input元素类型:email及url介绍

html5 svg 中元素点击事件添加方法

html5 标签

Html5 audio标签样式的修改

html5入门之设计原理

html5 canvas 简单画板实现代码

html5绘制时钟动画

html5 input属性使用示例

精品推荐
分类导航