摘要:<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>原生JS实现拖拽位置预览</title> <style> .box {position
阅读全文
摘要:<script language="javascript"> var selItm = new Array(4), selItemr = new Array(4),i,j; for ( i=0; i<4; i++){ selItm[i] = new Array(); selItemr[i] = ne
阅读全文
摘要:<!DOCTYPE html> <html> <head> <title>选择框,移动和重排选项</title> <script type="text/javascript" src="js/EventUtil.js"></script> </head> <body> <form> <select
阅读全文
摘要:<!DOCTYPE html> <html> <head> <title>表单序列化</title> <script type="text/javascript" src="EventUtil.js"></script> </head> <body> <form method="post" acti
阅读全文
摘要:<!DOCTYPE html> <html> <head> <title>Selectbox Example</title> <script type="text/javascript" src="EventUtil.js"></script> </head> <body> <form method
阅读全文
摘要:1.单项选择框——用事件选择选项并获取选中项信息 <!DOCTYPE html> <html> <head> <title>单项选择框——用事件选择选项并获取选中项信息</title> <script type="text/javascript" src="EventUtil.js"></scrip
阅读全文
摘要:注:此例只适用于文本框组,没有考虑隐藏字段<input type="hidden" />。 <!DOCTYPE html> <html> <head> <title>Textbox Tab Forward Example</title> <script type="text/javascript"
阅读全文
摘要:<!DOCTYPE html> <html> <head> <title>文本框剪贴板示例</title> <script type="text/javascript" src="EventUtil.js"></script> </head> <body> <p>文本框——只能在粘贴“仅由数字组成的
阅读全文
摘要:EventUtil.addHandler(textbox, "keypress", function(event){ event = EventUtil.getEvent(event); var target = EventUtil.getTarget(event); var charCode =
阅读全文
摘要:一、取得_用户在文本框中选择的文本 <!DOCTYPE html> <html> <head> <title>文本框脚本_取得选择的文本</title> <script type="text/javascript" src="EventUtil.js"></script> </head> <body
阅读全文
摘要:<script language="javascript"> var selItm = new Array(4), selItemr = new Array(4),i,j; for ( i=0; i<4; i++){ selItm[i] = new Array(); selItemr[i] = ne
阅读全文
摘要:1 2 3 4 5 测试 6 11 12 13 14 点我 15 16 17 34
阅读全文
摘要:我们在使用js过程中,有时候需要获取对象的宽度,如果对象本身是由内容撑开。宽度未知的情况,有一个强大的方法document.defaultView.getComputedStyle()可以获取对象的css样式;他返回的是一个CSS样式对象。
阅读全文
摘要:一、定义和用法 forEach( )方法用于调用数组的每个元素,并将元素传递给回调函数。 二、注意 forEach( )方法对空数组是不会执行回调函数的。 三、语法 array.forEach(function(currentValue,index,arr),this.Value) 四、参数 五、d
阅读全文