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

JavaScript¸ñʽ»¯×Ö·û´®¹¤¾ß

Several programming languages implement a sprintf function, to output a formatted string. It originated from the C programming language, printf function. Its a string manipulation function.
This is limited sprintf Javascript implementation. Function returns a string formatted by the usual printf conventions. See below for more details. You must specify the string and how to format the variables in it. Possible format values:
%% – Returns a percent sign
%b – Binary number
%c – The character according to the ASCII value
%d – Signed decimal number
%f – Floating-point number
%o – Octal number
%s – String
%x – Hexadecimal number (lowercase letters)
%X – Hexadecimal number (uppercase letters)
Additional format values. These are placed between the % and the letter (example %.2f):
+ (Forces both + and – in front of numbers. By default, only negative numbers are marked)
– (Left-justifies the variable value)
0 zero will be used for padding the results to the right string size
[0-9] (Specifies the minimum width held of to the variable value)
.[0-9] (Specifies the number of decimal digits or maximum string length)
If you plan using UTF-8 encoding in your project don’t forget to set the page encoding to UTF-8 (Content-Type meta tag), and use Javascript UTF-8 utility found on this website.
Ô­ÎÄÁ´½Ó: http://www.webtoolkit.info/javascript-sprintf.html
ÏÂÔØ:
webtoolkit.sprintf.js
http://download.csdn.net/source/1972105 


Ïà¹ØÎĵµ£º

ÉèΪÊ×Ò³ºÍÌí¼ÓÊղصÄJavascript´úÂë

ÉèΪÊ×Ò³ºÍÌí¼ÓÊղصÄJavascript´úÂ룬¼æÈÝÐÔ»¹¿ÉÒÔ£¬¸÷ÖÖÖ÷Á÷ä¯ÀÀÆ÷¶¼²âÊÔͨ¹ýÁË¡£
function addfavorite(){//¼ÓÈëÊÕ²Ø
if (document.all){
window.external.addFavorite("http://"+document.location.host+"/",document.title);
}else if (window.sidebar){
window.sidebar.addPanel(document.tit ......

Óà JavaScript ʵÏÖÍøÒ³Í¼Æ¬µÈ±ÈÀýËõ·Å

 <script language="JavaScript" type="text/javascript">
    <!--
    // ˵Ã÷£ºÓà JavaScript ʵÏÖÍøÒ³Í¼Æ¬µÈ±ÈÀýËõ·Å
    // ÕûÀí£ºhttp://www.CodeBit.cn 
    function DrawImage(ImgD,FitWidth,FitHei ......

ÍÆ¼ö9¿îºÜ°ôµÄÍøÒ³»æÖÆÍ¼±íJavaScript¿ò¼Ü½Å±¾


    ½ñÌìÒªÏò´ó¼ÒÍÆ¼ö9¿îºÜ°ôµÄ¿ÉÔÚÍøÒ³ÖлæÖÆÍ¼±íµÄJavaScript½Å±¾£¬ÕâЩÓÐȤµÄJS½Å±¾¿ÉÒÔ°ïÖúÄã¿ìËÙ·½±ãµÄ»æÖÆÍ¼±í£¨Ïß¡¢Ãæ¡¢±ý¡¢Ìõ…£©£¬ÆäÖаüÀ¨jQuery¡¢MooTools¡¢PrototypeºÍһЩÆäËüµÄJavaScript¿ò¼Ü¡£

Äú»¹¿ÉÒԲο¼ÒÔÏÂJavaScript/CSSÏà¹Ø½Ì³Ì¼°×ÊÔ´:


¡¶¾«Ñ¡30¸öÓÅÐãµÄCSS¼¼Ê ......

javascriptÖ®±íµ¥ÑéÖ¤ ÍêÃÀÌáÉýÓû§ÌåÑé

ÒýÑÔ
Ôö¼Ó¿Í»§¶ËµÄ±íµ¥ÑéÖ¤¿ÉÒÔΪÓû§Ìṩ¸ü¿ìµÄÌåÑ飬µ«¾ö²»ÄܺöÊÓµÄÊÇ£¬¿Í»§¶Ë±íµ¥ÑéÖ¤ÓÀÔ¶²»Ó¦¸ÃÈ¡´ú·þÎñÆ÷¶ËµÄÑéÖ¤£¬¶øÖ»ÄÜÊǸ¨ÖúºÍÔöÇ¿¡£¸ù¾Ý¾­ÑéJavaScriptÑéÖ¤±íµ¥»ù±¾·ÖΪÒÔϼ¸·½ÃæµÄÄÚÈÝ£¬±ØÌî×ֶΡ¢ÌØÊâģʽƥÅäµÈ£¬»¹Òª×¢Òâ´íÎóµÄÌáʾ·½Ê½¶ÔÒ»¸ö±íµ¥µÄ¿ÉÓÃÐÔÓÐ׿«ÆäÖØÒªµÄÓ°Ïì¡£
2½¨Á¢±íµ¥
  &nb ......

JavaScriptº¯Êý


http://xiayuanfeng.javaeye.com/blog/£¨Ô­ÎÄ£©
ʲôÊǺ¯Êý(Function)
function sum(a,b){  
     return a+b;  
}  
ÆäʵͨË×µÄ˵¾ÍÊÇÒ»¸öÓÐÃû³ÆµÄ´úÂë¶Î£¬·½±ãÖØÓá£
ҪעÒâµÄÊÇ£º
1.Javascript µÄº¯ÊýÓï·¨£¬ÒòΪJavascript±¾Éí¾ÍÊÇÇø·Ö´óСдµÄ£¬ËùÒÔfunction²»ÄÜд×÷Function»ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ