JavaScript δ½áÊøµÄ×Ö·û´®³£Á¿
JavaScript δ½áÊøµÄ×Ö·û´®³£Á¿
×öJavaScriptµÄʱºò,·¢ÏÖÀÏÊdzöÏÖ´íÎ󣺓δ½áÊøµÄ×Ö·û´®³£Á¿”.
×Ô¼ºÕÒÁËÏÂÓ¦¸ÃÊÇ´«²ÎÊýµÄʱºò,ÓÐÌØÊâ×Ö·ûÒýÆðµÄ.
ÍøÉÏÒ²ÕÒÁËÏÂ,Ò²Óкöà³öÏÖÕâÖÖÇé¿ö.×öÏÂ×ܽá,ÒÔ·½±ãÒÔºó²éÔÄ.
1.JAVASCRIPTÒýÓÃʱ,ʹÓõÄ×Ö·ûÓïÑÔ²»Ò»ÖÂ.
±ÈÈç:<script type=”text/javascript” src=”xxx.js” charset=”UTF-8″>.
xxx.jsÎļþÄÚ²¿Ê¹ÓõÄÊÇGB2312µÄ¸ñʽ,ÍâÃæµ÷ÓÃʹÓõÄÊÇUTF-8,ËùÒÔÎļþÄÚ²¿²¿·ÖÌØÊâ×Ö·ûÒòΪ¸ñʽ²»Ò»ÖÂ,³öÏÖÂÒÂë,Ôì³É´ËÔÒò.
¸ÄΪcharset="GBK"¾Í¿ÉÒÔÁË
2.JAVASCRIPTÊä³öHTML×Ö·ûʱ,Ç°ºó±ê¼Ç²»Æ¥Åä.
ÕâÖֱȽϳ£¼û,ÍùÍùÔÚÊä³ö×Ö·û´®Ê±,³öÏÖµ¥ÒýºÅ(’)»òË«ÒýºÅ(”)²»Åä¶Ô,»òÕßÊÇÔÚdocument.write()µÄʱºò,ûÓÐÕýÈ·Êä³öµ¥ÒýºÅ(’)»òË«ÒýºÅ(”)
3.²ÎÊýÄÚ³öÏÖHTML±ê¼ÇÓïÑÔ»ò°üº¬»»Ðзû
ÎÒ½ñÌìËùÓöµ½µÄÊÇÕâÖÖÇé¿ö.ÒòΪÎÒËùµÃµ½µÄÊý¾ÝÒÔ²ÎÊýÐÎʽ´«¸øÒ»º¯Êý,½á¹û¸ÃÊý¾ÝÀï°üº¬»»Ðзû,Ôì³ÉÁË´Ë´íÎó.
Èç:Ò»°ã²âÊÔʱֻʹÓõ¥ÐеÄÊý¾Ý,ÊÇÕý³£µÄ,δ³öÏÖÕâ¸ö´íÎó,.
µ±²âÊÔʱʹÓöàÐÐÊý¾Ý,²¢Ê¹ÓûسµÁ´»»ÐÐ,¾Í³öÐÐÁË´Ë´íÎó.ÒòΪÀïÃæ°üº¬ÁË»»Ðзû
¶ÔÓÚµÚ3ÖÖÇé¿ö,ÎҵĽâ¾ö·½·¨ÊÇ:²»Ö±½Ó½«¸ÃÊý¾ÝÒÔ²ÎÊýÐÎʽ´«µÝ,¶øÊÇÏȽ«Æ丳ֵÔÚÒ»¸öÒþ²ØµÄÎı¾ÄÚ,ÐèÒªµ÷Óõĺ¯ÊýÀïÖ»Ðè¶ÁÈ¡¸ÃÎı¾ÀïµÄÄÚÈݼ´¿É.
Ïà¹ØÎĵµ£º
<%@ page language="java" import="java.util.*,com.page.wash.giveclothing.*" pageEncoding="gbk"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ìí¼Ó±í¸ñÐÅÏ¢</title>
<meta http-equiv="pragma" content="no-c ......
function unique(data){debugger;
data = data || [];
var a = {};
for (var i=0; i<data.length; i++) {
var v = data[i];
......
HtmlÒ³
<a href="javascript:void(0);" mce_href="javascript:void(0);" ><img id="SubmitFeedback" src="/images/comment_btn.gif" mce_src="images/comment_btn.gif" /></a>
½Å±¾
$(document).ready(function() {
alert("Ò³ÃæË¢ÐÂ&q ......
Ò». »ù´¡Æª
1. Javascriptѧϰ±Ê¼Ç1——Êý¾ÝÀàÐÍ
2. Javascriptѧϰ±Ê¼Ç2——º¯Êý
3. Javascriptѧϰ±Ê¼Ç3——×÷ÓÃÓò
4. Javascriptѧϰ±Ê¼Ç4——Evalº¯Êý
5. Javascriptѧϰ±Ê¼ ......
ÓÃJavascript»ñÈ¡Ò³ÃæÔªËصÄλÖÃ
ÈîÒ»·å ·¢±íÓÚ 2009Äê09ÔÂ14ÈÕ
|
·ÖÀࣺÊ×Ò³
-> µµ°¸
-> IT¼¼Êõ
ÖÆ
×÷ÍøÒ³µÄ¹ý³ÌÖУ¬ÄãÓÐʱºòÐèÒªÖªµÀij¸öÔªËØÔÚÍøÒ³ÉϵÄÈ·ÇÐλÖá£
ÏÂÃæµÄ½Ì³Ì×ܽáÁËJavascriptÔÚÍøÒ³¶¨Î»·½ÃæµÄÏà¹Ø֪ʶ¡£
Ò»¡¢ÍøÒ³µÄ¾ø¶Ô´ó ......