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

Ê·ÉÏ×îÅ£X×î¼ò½àµÄJavascriptͼƬËõ·Å´úÂë

Ô´Â룺
function resize(img, width, height) {
 (img.width > img.height)
 ? ((img.height = Math.min(height, width * img.height/img.width)) || (img.width = Math.min(width, img.width)))
 : ((img.width = Math.min(width, height * img.width/img.height)) || (img.height = Math.min(height, img.height)));
}
ÉÔ΢ѹËõһϣº
function resize1(i,w,h){var a=i.width;var b=i.height;a>b?((i.height=Math.min(h,w*b/a))||(i.width=Math.min(w,a))):((i.width=Math.min(w,h*a/b))||(i.height = Math.min(h,b)));}


Ïà¹ØÎĵµ£º

JavaScript¶ÔÏóÄ£ÐÍ Ö´ÐÐÄ£ÐÍ

Êý¾ÝÀàÐÍ
»ù±¾Êý¾ÝÀàÐÍ
»ù±¾Êý¾ÝÀàÐÍÊÇJSÓïÑÔ×îµ×²ãµÄʵÏÖ¡£
¼òµ¥ÊýÖµÀàÐÍ: ÓÐUndefined, Null, Boolean, NumberºÍString¡£×¢Ò⣬ÃèÊöÖеÄÓ¢Îĵ¥´ÊÔÚÕâÀï½öÖ¸Êý¾ÝÀàÐ͵ÄÃû³Æ£¬²¢²»ÌØÖ¸JSµÄÈ«¾Ö¶ÔÏóN an, Boolean, Number, StringµÈ£¬ËüÃÇÔÚ¸ÅÄîÉϵÄÇø±ðÊDZȽϴóµÄ¡£
¶ÔÏó: Ò»¸öÎÞÐòÊôÐԵļ¯ºÏ£¬ÕâЩÊôÐÔµÄֵΪ¼òµ¥ÊýÖµÀ ......

JavascriptºÍAjaxÖÐÎÄÂÒÂëÍÂѪ°æ½â¾ö·½°¸

Òý×Ô£ºhttp://www.cnblogs.com/dongritengfei/archive/2009/12/21/1628489.html
 
½ñÌìŪÁËÒ»ÌìµÄAjaxÖÐÎÄÂÒÂëÎÊÌ⣬AjaxµÄÂÒÂëÎÊÌâ·ÖΪÁ½ÖÖ£º
1. JavaScriptÊä³öµÄÖÐÎÄÂÒÂ룬
±ÈÈ磺alert("ÖÐÎÄÂÒÂë²âÊÔ");
½â¾öµÄ°ì·¨±È½Ï¼òµ¥£¬¾ÍÊÇ°ÑjspÀïËùÓеÄcharsetºÍpageEncodingµÄÖµ¶¼ÉèÖóÉÏàͬµÄ£¬Ò»°ãÊÇutf-8.
  ......

JavaScript ÉèΪÖ÷Ò³Óë¼ÓÈëÊÕ²Ø

//ÉèÖõ±Ç°Ò³ÃæΪÓû§µÄÊ×Ò³
function setHomepage()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
   event.returnValue=false;
   return;
}
//¼ÓÈëÊÕ²Ø
function addFavorite()
{
 &nb ......

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

¶«Î÷ºÜ¼òµ¥£¬Ö»ÊÇ×Ô¼º¼ÇÐÔ²»ºÃ£¬¾­³£Íü¼ÇһЩ¹Ø¼ü×Ö
ËùÒÔ·¢Á˵ãʱ¼äÕûÀíÁËÒ»ÏÂ
/*------------------------------------------------------
 *×÷Õߣºxieyu @ 2007-08-14
 *ÓïÑÔ£ºJavaScript
 *˵Ã÷£ºselectÔªËØjavascript³£ÓòÙ×÷
 * 1.ÅжÏÊÇ·ñ´æÔÚÖ¸¶¨valueµÄItem
 * 2.¼ÓÈëÒ» ......

ÓÃjavascript¿ØÖÆ¿ò¼ÜµÄsrcÊôÐÔ

<input   type=button   onclick="aaa();"   value="È·¶¨">  
  <iframe   name="frame1">  
  <script   language=javascript>  
  function   aaa()  
  {  
  docume ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ