栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

每当在文本字段中发生更改时就检查表单的验证,就像在gmail注册表单中一样

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

每当在文本字段中发生更改时就检查表单的验证,就像在gmail注册表单中一样

我认为这是您要寻找的:

更改表示表格数量的 计数

<html><head><title>Arithmetic operations</title></head><script type="text/javascript">function Multiplication(o1, o2, o3){    var x,y,z;    x=o1.value;    y=o2.value;    z=x*y;    o3.value=z}function calcForm(formNode){    Multiplication(formNode.value1, formNode.value2, formNode.value3);}</script></head><body><div ><form name="calc">    <h1>online Calculator</h1>    Enter first Numeric Value :    <input       id="value1"       type       = "text"       onchange   = "calcForm(this.parentNode)"       onkeypress = "this.onchange();"       onpaste    = "this.onchange();"       oninput    = "this.onchange();"       onloadstart     ="this.onchange();"       value      = "5"    />     </br>    Enter Second Numeric Value :    <input       id="value2"       type       = "text"       onchange   = "calcForm(this.parentNode)"       onloadstart= "this.onchange();"       onkeypress = "this.onchange();"       onpaste    = "this.onchange();"       oninput    = "this.onchange();"       value      = "1"    />     </br>     </br>    Result of the Arithmetic operation is : <output type="number" id="value3"> </output></br>    </form></div><div id="i_container"></div><script>    count = 15;    my_parent = document.getElementById('i_container');    for(i=0; i<count; i++){        nw = calc.cloneNode(true);        nw.name = "dynamic_name_"+i;        nw.id = "dynamic_id_"+i;        my_parent.appendChild(nw);    }    for(i=0; i<count; i++){        p = document.getElementById("dynamic_id_"+i);        calcForm(p);    }</script></body></html>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/616006.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号