Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ѹËõjavascriptºÍcss


This document is for establishing build standard for JavaScript and CSS compression
The objective for this document is to establish a companywide JavaScript and CSS compression standard that can be shared crossing multiple SharePoint product development projects. This is the first draft
Overview
Our SharePoint development involves many client side scripts programming style sheet design. In order to improve JavaScript and CSS loading performance and protect our work from copying, we need to establish a standard way to make our script and css shorter and hard to read. Following steps will help you to understand how to do it without knowing all implementation details.
Step 1: Build Compression Environment
System Requirement: Windows XP/Server 2003 Virtual Environment.
Software: JDK 1.4+, yuicompressor-2.4.2.jar
 
Step 2: JavaScript Naming Standard
1)    JavaScript Naming Standard: name-x.y.z.js
2)    Compressed JavaScript Naming Standard: name-x.y.x.min.js
Step 3: Compress a JavaScript
Usage: java -jar yuicompressor-2.4.2.jar myfile-x.y.z.js -o myfile-x.y.z.min.js
 
java -jar yuicompressor-x.y.z.jar [options] [input file]
Global Options
  -h, --help               Displays this information
  --type <js|css>          Specifies the type of the input file
  --charset <charset>      Read the input file using <charset>
  --line-break <column>    Insert a line break after the specified column number
  -v, --verbose             Display informational messages and warnings
  -o <file>                 Place the output into <file>. Defaults to stdout.
JavaScript


Ïà¹ØÎĵµ£º

JavaScriptµ¯³öÒ³Ãæ

<script language="javascript" type="text/javascript">
fea = "width=400,height=300,top=100,left=300,resizable=0,scrollbars=0,dependent=yes";
fea_action="width=200,height=100,left=256,top=260,resizable=0,scrollbars=0,dependent=yes"
function f_gopage(page){
form2.page.value=page;
form2.pages ......

ʹÓÃDisplayTagºÍJavaScript´´½¨ÔöÇ¿Ð͵ıí¸ñ


Every Web developer has to tangle with tables. A new open source library, DisplayTag, can make life with tables much more organized. Find out how to combine the DisplayTag library with JavaScript to make a slick app that displays line item details.  
by Stephen Strenn
isplaying data in a t ......

JSEclipse javaScript¿ª·¢¹¤¾ß°²×°ÅäÖÃ

ZendStudioÖа²×°JSEclipse²å¼þ
Help -> Install New SoftWare
Work with:     add
name:JSEclipse  Location:
http://download.macromedia.com/pub/labs/jseclipse/autoinstall
°²×°Íê³ÉºóÅäÖãº
ÐèÒª¸æËß Eclipse ËüÓÐÒ»¸ö JavaScript ÎļþµÄרÓñ༭Æ÷£¬ÕâÑùËüÓÃÎĽ«²»Ê¹ÓÃͨ±¾±à¼­Æ ......

javascript ÔÚ ie ºÍ firefox Çø±ð

1.document.formName.item("itemName") ÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
JQUERY:
$("#idName")
  &nb ......

javascriptѧϰÈÕÖ¾Èý

1¡¢¶ÔÏóÊôÐÔ£º.lengthΪ³¤¶ÈÊôÐÔ£¬
         .toUpperCase()Ϊ´óд×ÖĸÎı¾
2¡¢indexofº¯Êý·½·¨·µ»Ø×Ö·û´®ÄÚµÚÒ»´Î³öÏÖ×Ö·û´®µÄ×Ö·ûλÖã¬×Ö·û´®µÄλÖôÓ0¿ªÊ¼£¬Èç¹ûûÓÐÕÒµ½×Ó×Ö·û´®£¬Ôò·µ»Ø-1
3¡¢match()·½·¨¿ÉÓÃÀ´ÕÒµ½×Ö·û´®ÖÐÌØ¶¨µÄ×Ö·û£¬Èç¹ûÕÒµ½Ôò·µ»ØÕâ¸ö×Ö·û£¬Èç¹ûûÓÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ