Time of Update: 2018-12-03
(一).樣本圖片效果(二).代碼<html><head><title>escape()函數的用法</title></head><body><script language="javascript">function run(){//把文字框input1的值轉換成一條javascript命令並執行eval(document.form1.input1.value); }</script><form
Time of Update: 2018-12-03
<!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><meta http-equiv="Content-Type" content="text/html;
Time of Update: 2018-12-03
<html> <head> <title>Upload Image</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF" text="#000000">
Time of Update: 2018-12-03
We can use the prototype chain to implement the inheritance of methods from a super class.The method most people use:function inherit(sub, supper){ var subProto = sub.prototype = new supper(); subProto.constructor = sub;}Note: this will
Time of Update: 2018-12-03
function object2String(obj){var val, output = "";if (obj){output += "{";for (var i in obj){val = obj[i];switch (typeof val){case ("object"):if (val[0]){output += i + ":" + array2String(val) + ",";}else{output += i + ":" + object2String(val) +
Time of Update: 2018-12-03
//---------------------------------------------------// 判斷閏年//---------------------------------------------------Date.prototype.isLeapYear = function(){ return (0==this.getYear()%4&&((this.getYear()%100!=0)||(this.getYear()%400==0)));}//-
Time of Update: 2018-12-03
今天,寫了代碼,主要就是測試servlet與javascript連結後完成無重新整理的功能。其中主要的代碼都很清楚,用到的核心是XMLHttpRequest對象。首先,XMLHttpRequest對象使用過程用到五個步驟:在下面的代碼中,我將標註出來。這次程式過程中遇到的問題需要注意的有:1.建立工程後要記得重新部署。2.建立servlet的時候,別忘了還有web.xml。3.不用form提交,直接用onclick事件就可以了。4.傳值的時候open()中的url,可以傳遞參數的。例如:url=
Time of Update: 2018-12-03
<style><!--table{border-top-width:0px;padding-right:0px;padding-left:0px;border-left-width:0px;border-bottom-width:0px;padding-bottom:0px;margin:0px;padding-top:0px;border-right-width:0px}body{padding-right:0px;padding-left:0px;font-size:12p
Time of Update: 2018-12-03
<script type="text/javascript" language="javascript">function show(checkbox_list){ var checkbox_list = document.getElementById(checkbox_list);checkbox_list.style.display = "block";}function hidden(checkbox_list){ var checkbox_list =
Time of Update: 2018-12-03
<html><head> <title></title></head><body><div id='jsdiv' style="border:1px solid #ccc"></div><script type="text/javascript">//得到字串的真實長度(雙位元組換算為兩個單位元組)function getStrActualLen(sChars){
Time of Update: 2018-12-03
<html><head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>提示資訊框</title> <style type="text/css"> a { color: #000; font-size: 12px;
Time of Update: 2018-12-03
<html><head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>提示資訊框</title> <style type="text/css"> body { filter:
Time of Update: 2018-12-03
<!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><meta http-equiv="Content-Type" content="text/html;
Time of Update: 2018-12-03
先來看一個簡單的例子: 下面以三個頁面分別命名為frame.html、top.html、bottom.html為例來具體說明如何做。 frame.html 由上(top.html)下(bottom.html)兩個頁面組成,代碼如下: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> frame
Time of Update: 2018-12-03
1.substring 方法定義和用法substring 方法用於提取字串中介於兩個指定下標之間的字元。文法stringObject.substring(start,stop)參數 描述start 必需。一個非負的整數,規定要提取的子串的第一個字元在 stringObject 中的位置。stop 可選。一個非負的整數,比要提取的子串的最後一個字元在 stringObject 中的位置多
Time of Update: 2018-12-03
/*由於javascript是一種無類型語言,所以一個數組的元素可以具有任意的資料類型,同一個數組的不同元素可以具有不同的類型,數組的元素設定可以包含其他數組,這樣就可以建立一個複雜的數組了.並且在這點上說javascript作為一種指令碼語言不同於那種嚴格的物件導向的c++.c#,java了.具有更高的靈活性.*//*在javascript1.1和其後的版本中,數組是用建構函式Array()和運算子new來建立,可用以下的三種方式來建立javascript 中的數組.*/var a=new
Time of Update: 2018-12-03
<%@page contentType="text/html;charset=gb2312"%><html><head><script language="javasctipt" type="text/javascript"> function login(){ //thisForm是form中的name var form = document.thisForm; if(trim(form.name.value) ==
Time of Update: 2018-12-03
tooltip1. JS檔案代碼:tooltip.js (請不要更改!避免發生錯誤!)/************************************************************************* dw_viewport.js version date Nov 2003 This code is from Dynamic Web Coding at http://www.dyn-web.com/ Copyright 2003 by Sharon
Time of Update: 2018-12-03
<script language="javascript" type="text/javascript"> function mdcheck(value,select_id){ var opt = document.getElementById(select_id).innerHTML.toString();
Time of Update: 2018-12-03
最近發現DOMDocument對象很重要,還有XMLHTTP也很重要注意大小寫一定不能弄錯.屬性: 1Attributes 儲存節點的屬性列表(唯讀) 2childNodes 儲存節點的子節點列表(唯讀) 3dataType 返回此節點的資料類型 4Definition 以DTD或XML模式給出的節點的定義(唯讀) 5Doctype 指定文件類型節點(唯讀) 6documentElement 返迴文檔的根項目(可讀寫) 7firstChild