javascript³£ÓÃ
calcu() ----º¯ÊýʵÏÖÁ½¸öÊýÏà³Ë
document.write(); ---´òÓ¡
document.calc.ÔªËØÃû.value; --»ñµÃ±íµ¥µÄÖµ
document.±íµ¥Ãû¡£±íµ¥ÔªËØÃû¡£value Ϊ±íµ¥¸³Öµ
¶¨Ò庯Êý£º
function Ãû×Ö()
{
//javaScriptÔ¤Óï¾ä
}
onClick="º¯ÊýÃû"; //Êó±êµ¥»÷
Âß¼Óï¾ä£º
if{}else{} while(){} for(var i=0;i<4;i++) switch()
return --Ó°Ï캯ÊýÌ壬¿ÉÒÔÓзµ»ØÖµ£¬»òûÓзµ»ØÖµ
woindow ÊÇ×²ãµÄ¶ÔÏó£¬ËùÒÔдʱ¿ÉÒÔÊ¡ÂÔ£¬ÒòΪËûÊÇÔ¤ÀÀÆ÷Ä£ÄâÖеÄ×²ãµÄ¶ÔÏó£¬ËùÒÔËûÓгÆΪԤÀÀÆ÷¶ÔÏó¡£
document.getElementById('idÔªËØ').innerHTML="ËÑË÷Ãû×Ö";
document.getElemantById('idÔªËØ').href="¸üºóµÄ·¾¶"£»
window¶ÔÏóµÄ³£ÓÃÊôÐÔ£º
status£º Ö¸¶¨Ô¤ÀÀÆ÷״̬À¸ÖÐÏÔʾµÄÁÙʱÏûÏ¢
screen: Óйؿͻ§¶ËµÄÆÁÄ»ºÍÏÔʾÐÔÄܵÄÏûÏ¢
history: Óйؿͻ§·ÃÎÊURLµÄÏûÏ¢
location:Óйص±Ç°URlÏûÏ¢
document:±íʾԤÀÀÆ÷´°¿ÚÖеÄHTNLÎĵµ
window¶ÔÏóµÄ³£Ó÷½·¨£º
alert("ÌáʾÐÅÏ¢"); --ÏÔʾÌáʾ£¨´øÓÐÌáʾÐÅÏ¢ºÍÈ·¶¨°´Å¥µÄ¶Ô»°¿ò£©
confirm("ÌáʾÐÅÏ¢"); --ÏÔʾÌáʾ£¨´øÓÐÌáʾÐÅÏ¢¡¢È·¶¨°´Å¥ºÍÈ¡Ïû°´Å¥µÄ¶Ô»°¿ò£©
open("url","name"); --´ò¿ª¾ßÓÐÖ¸¶¨Ãû³ÆµÄд°Ì壬²¢¼ÓÔظø¶¨µÄURLËùÖ¸¶¨µÄÎĵµ£¬ÈçûÓÐÖ¸¶¨Ôò´ò¿ª¿ÕÎĵµ¡£
close(); --¹Ø±Õµ±Ç°´°Ìå
showModalDialog(); --ÔÚģʽ»¯´°¿ÚÖÐÏÔʾָ¶¨µÄHTMLÎĵµ
window.returnValue() --¿ÉÒÔ·µ»Ø´ò¿ª´°¿ÚµÄÖµ
locationÊôÐÔ£º
location.href; ---Ϊurl ¸³Öµ
locationµÄ·½·¨£º
location.assgin("url"); ---¼ÓÔØÒ»¸öÒ³Ãæ
location.reload(); --¼ÓÔص±Ç°Ò³
location.replace("url"); --Ìæ»»µ±Ç°Ò³
»ñÈ¡ÊôÐԵķ½·¨£º
document.getElementById(); ---ͨ¹ýiDÀ´»ñµÃÊôÐÔ
document.getElementsByName(); --- ͨ¹ýnameÀ´»ñµÃÊôÐÔ
document.getElementsByTagName(); ---ͨ¹ý±êÇ©À´»ñµÃÊôÐÔ
document.calc.ÔªËØÃû.value; --»ñµÃ±íµ¥µÄÖµ
history¶ÔÏóµÄ·½·¨£º
back(); ----ºóÍË
forward(); ---Ç°½ø
&nb
Ïà¹ØÎĵµ£º
function getCookies(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return '';
}
function setCookie(name, value, expires,
function getCookies(name)
{
var a ......
Ò»¡¢Ê²Ã´ÊDZհü£¿ ¡°¹Ù·½¡±µÄ½âÊÍÊÇ£º±Õ°üÊÇÒ»¸öÓµÓÐÐí¶à±äÁ¿ºÍ°ó¶¨ÁËÕâЩ±äÁ¿µÄ»·¾³µÄ±í´ïʽ£¨Í¨³£ÊÇÒ»¸öº¯Êý£©£¬Òò¶øÕâЩ±äÁ¿Ò²ÊǸñí´ïʽµÄÒ»²¿·Ö¡£
ÏàÐźÜÉÙÓÐÈËÄÜÖ±½Ó¿´¶®Õâ¾ä»°£¬ÒòΪËûÃèÊöµÄ̫ѧÊõ¡£ÆäʵÕâ¾ä»°Í¨Ë×µÄÀ´Ëµ¾ÍÊÇ£ºJavaScriptÖÐËùÓеÄfunction¶¼ÊÇÒ»¸ö±Õ°ü¡£²»¹ýÒ»°ãÀ´Ëµ£¬Ç¶Ì×µÄfunctionËù²úÉúµÄ± ......
1. ¶¨ÒåÒ»¸öÓÃÓÚÊä³öJavaScript´úÂë µÄServletÀà¡£
package com.mycompany.response.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServle ......