`
文章列表
Prototype中使用Event的一个简单的例子: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>使用Event</title> <me ...
先看使用Form操作表单: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Form元素</title> <meta name=" ...
先看ObjectRange的应用: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ObjectRange</title> <meta na ...
下面是each()方法的遍历示范 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>使用Enumerable</title> <meta na ...
增加CSS样式 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>使用Element对象</title> <meta name="a ...
JSON格式的数据具有轻量级,易懂,跨语言的优势,Prototype库的JSON支持Date,Object,Array,Hash,Number类增加里toJSON()方法。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ...
Prototype只是一个JavaScript库, 可到http://www.prototypejs.org/download站点去下载最新版本,点击连接“目标另存为”就可以了。使用它很简单copy到项目中,然后: <script type="text/javascript" src="js/prototype-1.6.0.3.js"></script>  第一个简单的Prototype程序: <%@ page language="java" import="java.util.*&quo ...
XMLHttpRequest是Ajax的灵魂,Ajax技术的核心就是异步放松请求,而XMLHttpRequest则是异步放松请求的对象。 下面就是一个简单的Ajax程序: <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+reque ...
JS代码 var Calendar = function( instanceId, language, startYear, endYear ){ if( typeof instanceId == "string" ){ this.Date = new Date(); this.Year = this.Date.getFullYear(); this.Month = this.Date.getMonth(); this.Week = this.Date.getDay(); this.Today = this.Date.getDat ...
JS代码 var Calendar = function( instanceId, language, startYear, endYear ){ if( typeof instanceId == "string" ){ this.Date = new Date(); this.Year = this.Date.getFullYear(); this.Month = this.Date.getMonth(); this.Week = this.Date.getDay(); this.Today = this.Date.getDat ...
js代码 function Calendar(beginYear, endYear, language, patternDelimiter, date2StringPattern, string2DatePattern) { this.beginYear = beginYear || 1980; this.endYear = endYear || 2020; this.language = language || 0; this.patternDelimiter = patternDelimiter || "-"; this.date ...
先看js代码 function drag(target, event) { // 定义开始拖动时的鼠标位置(相对window座标) var startX = event.clientX; var startY = event.clientY; //定义将要被拖动元素的位置(相对于document座标) //因为该target的position为absolutely,所以我 ...
先看下效果    下面就是JS代码 function clickHandler() { //定义需要操作的XHTML元素id var targetId; //定义需要被操作的XHTML元素 var targetElement; //定触发事件的事件源(其中event是隐式可用的全局对象) var srcElement = event.srcElement; //根据其className属性值判断它不是叶子节点,即该节点可以展开 if (srcElement.className.substr(0,7) == "outline") { ...
import java.io.IOException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import com.sun.org.apache.xerces.internal.impl.xs.dom.DOMParser; public class DOMParserTest { public static v ...
为列表框,下拉菜单增加选项 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/&quo ...
Global site tag (gtag.js) - Google Analytics