Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐĿǰ¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×î¶¥¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×î¶¥¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

JavaScript È«½Ç°ë½Çת»»ÎÊÌâ

<script language=JAVAscript>
var s="b";
var strCode
for(var i=0;i<s.length;i++)
{
strCode=s.charCodeAt(i);
if((strCode>65248)||(strCode==12288))
{
alert("ÓÐÈ«½Ç");
break;
}
}
</script>
°ë½Ç×Ö·ûÓÉÒ»¸ö×Ö½Ú±£´æ£¬È«½Ç×Ö·ûÓÃÁ½¸ö×Ö½Ú±£´æ
ËùÒÔÂëÖµµÄ¾ø¶ÔֵСÓÚ256µÄ¾ÍÊǰë½Ç£¬· ......

ADF ÖÐOnClickµÄJavaScriptµÄÖ§³ÖÎÊÌâ

ADF 11g²»ÔÙÖ§³ÖOnclickµÈJavaScript£¬¶øÊDzÉÓÃ<af:clientListener>À´ÊµÏÖÖîÈçɾ³ýijÌõ¼Ç¼µÄÌáʾ¿ò¡£
ʵÏÖ·½Ê½ÈçÏ£º
 
 function confirmDelete() {
if (confirm('Are you sure you want to delete this record?'))
return true;
else
return false;
}

<af:commandLink actionListener="# ......

selectÔªËØjavascript³£ÓòÙ×÷

 *˵Ã÷£ºselectÔªËØjavascript³£ÓòÙ×÷
* 1.ÅжÏÊÇ·ñ´æÔÚÖ¸¶¨valueµÄItem
* 2.¼ÓÈëÒ»¸öItem
* 3.ɾ³ýֵΪvalueµÄËùÓÐItem
* 4.ɾ³ýijһ¸öindexµÄÑ¡Ïî
* 5.¸üеÚindexÏîµÄvalueºÍtext
* 6.ÉèÖÃselectÖÐÖ¸¶¨textµÄµÚÒ»¸öItemΪѡÖÐ
* 7.ÉèÖÃselectÖÐÖ¸¶¨valueµÄµÚÒ»¸öItemΪѡÖÐ
* 8.µÃµ½µ±Ç°Ñ¡ÖÐÏîµÄv ......

FlexÓëJavaScriptµÄ½»»¥

Flex Óë JavaScript ½»»¥£¬Ö÷ÒªÒÀ¿¿FlexµÄExternalInterface£¬ÆäÌṩÁËaddCallBackºÍcall·½·¨.
ÏÂÃæµÄÀý×Ó½«ÑÝʾFlexµ÷ÓÃjavascript£¬ºÍjavascriptµ÷ÓÃFlex¡£
js ´úÂë
-------------------------------------------------------------------------------------------------------------
function hello(param) {
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ