javascript¿çÓò·ÃÎÊ·½Ê½
Õ⼸ÌìÔÚÊÔÓÃÌÔ±¦µÄopen api¹¦ÄÜ£¬¿´ÁËËüµÄʵÀýÓÐphp¡¢java¡¢c#¡¢ruby£¬¿Éϧ¶¼ÊÇ·þÎñÆ÷¶ËÀý×Ó£¬¾ÍͻȻÓÐÁËÏë·¨£¬ÊDz»ÊÇ¿ÉÒÔÓÃjavascriptдһ¸ö¿Í»§¶ËµÄÀý×Ó¡£ÌÔ±¦open apiËäÈ»ÆäËüµØ·½×öµÄ²»ÊǺÜÈËÐÔ»¯£¬µ«ÊÇ»¹ÌṩÁËÒ»¸öα´úÂëµÄÀý×Ó£¬¼ÈÈ»ÕâÑù£¬Ëµ¸É¾Í¸É¡£ËµÊµ»°£¬ÒÔÇ°´ÓÀ´Ã»ÓÐд¹ýjavascript´úÂ룬²»¹ýÓÐÍøÂçÒ²²»ÊÇʲô´óÎÊÌ⣬ÒÀ¿¿w3schoolºÍ°Ù¶È»ù±¾ÉÏ»¨ÁËÒ»¸öСʱ¾ÍÍê³ÉÁË£¬ÔÚdreamweaverÉÏÃæʹÓÓʵʱÊÓͼ”£¬¿´½á¹ûҲûÓÐÎÊÌ⣬¿ÉÊÇÒ»µ©ÓÃfirefox»òÕßie´ò¿ª£¬¾Í²»ÐÐÁË£¬»ñÈ¡²»ÁËÌÔ±¦apiµØÖ·ÌṩµÄjson»òÕßxmlÊý¾Ý£¬¸Õ¿ªÊ¼ÎÒ»¹ÒÔΪÊDZàÂëµÄÎÊÌ⣬xmlhttprequestµÄ´¦ÀíдµÄÓÐÎ󣬵«ÊǸÄÁ˺ܶ࣬ÎÊÌâÒÀ¾É£¬ºÜÊÇÄջ𣬾Í×Ðϸ¿´ÁËxmlhttprequestµÄ˵Ã÷£¬ºóÀ´²Å»ÐÈ»´óÎò£ºjavascriptÊDz»ÄÜ¿çÓò·ÃÎÊ·þÎñÆ÷µÄ¡£¿´À´²»×öÇ°¶Ë¿ª·¢¾Í»áºÜ¶à»ù´¡ÎÊÌⶼ²»¶®°¡£¡
ÄÇôÔõô½â¾öÄØ£¿°Ù¶ÈgoogleÁ˺ܶ࿴µ½¿ÉÐв¢ÊÔÑé¹ýµÄ½â¾ö°ì·¨ÓУº
1. ÔÚ·þÎñÆ÷¶Ë¼ÜÉè´úÀí£¬ÓÃphp»òÕß±ðµÄÓïÑÔдһ¸öproxyº¯Êý£¬Í¨¹ýÕâ¸öº¯ÊýÍê³É¶ÔµÚÈý·½ÓòÃûµÄÊý¾ÝÇëÇó£¬Õâ¸ö°ì·¨ºÍÎÒ×ʼµÄ´¿javascript·½°¸³åÍ»£¬Ã»ÓÐÑ¡Ôñ£¬²»¹ýµÄÈ·¿ÉÓÃ
2. ²ÉÓÃjavascript¶¯Ì¬×ÊÔ´ÔØÈëµÄ°ì·¨£¬¾ÍÊÇͨ¹ýjavascript¶¯Ì¬´´½¨Ò»¸öDom scriptÔªËØ£ºcreateElement()£¬È»ºóÉèÖøÃscriptÔªËصÄsrcµØÖ·ÊÇÄãÏë¿çÓòÇëÇóÊý¾ÝµÄurl£¬ÕâÑùµÚÈý·½ÓòÃûµÄÊý¾Ý¾Í¿ÉÒÔ±»ÔØÈë½øÀ´ÁË£¬µ«ÊÇÓÐÒ»¸öȱµã¾ÍÊÇ£¬µÚÈý·½ÓòÃûµÄÊý¾Ý±ØÐëÊÇÕýÈ·µÄjavascript¸ñʽÊý¾Ý£¨±ÈÈçjsonÊý¾Ý£©£¬ÔÚYUIÉϵÄGET¹¤¾ß¾ÍÓÐÒ»¸ö·â×°ºÃµÄʵÏÖ£¬´ó¼Ò¿ÉÒÔ·ÅÐÄ¡¢¿ì½ÝµÄʹÓã¬×ʼÎÒÒ²ÊÇÏëÓÃÕâ¸ö°ì·¨£¬±Ï¾¹ÌÔ±¦open apiµÄÊý¾ÝÊÇÖ§³Öjson¸ñʽµÄ£¬µ«ÊÇÔÚʵ¼Ê¹ý³ÌÖÐÓÖÃæÁÙÕâÑùµÄÎÊÌ⣺ÌÔ±¦open api·µ»ØµÄjsonÊý×飬ÊÇûÓж¨Òå±äÁ¿ÃûµÄ£¬¶øÕâÑùµÄjosonÊý×éÔÚjavascriptÊÇ·Ç·¨µÄ£¬Òò´ËÈÎÈ»µÃ²»µ½µ÷Óã¬Õâ¸ö°ì·¨Ê§°Ü£¬µ«ÊÇÕâÊÇÒ»¸öºÜºÃµÄ°ì·¨£¬µ½Ê±ºò¿ÉÒÔÔÚÊý¾Ýͳ¼Æjs´úÂëÉÏ×öһЩÎÄÕ£¬±ÈÈç˵½øÐÐÓû§µ÷²éµÈ
3. ²ÉÓÃiframeµÄ°ì·¨£¬·½·¨ºÍ·½·¨2±È½ÏÀàËÆ£¬Ò²ÊÇͨ¹ýjavascript¶¯Ì¬´´½¨Ò»¸öDom iframeÔªËØ£¬È»ºóÉèÖÃiframeÔªËصĵØÖ·ÊÇÄãÏë¿çÓòÇëÇóµÄÊý¾ÝµÄurl£¬È»ºóͨ¹ýjavascript»ñÈ¡iframeÔªËصÄ<pre>±êÇ©ÀïÃæµÄÄÚÈݾÍÊÇÄãÏëÒªµÃµ½µÄ¿çÓòÊý¾ÝÁË¡£Õâ¸ö°ì·¨µÄȱµã¾ÍÊÇä¯ÀÀÆ÷»º´æÑÏÖØ£¬Èç¹ûͬһ¸öurlµÄÊý¾Ý±ä»¯Æ
Ïà¹ØÎĵµ£º
<script language="javascript">
var timeLen = "0";
var timer = null;
function beginTimer()
{
var hour="0";
var minute="0";
var second="0";
timeLen = parseInt(timeLen)+1;
hour = parseInt(timeLen/3600) ;
minute = parseInt((timeLen-( ......
function AddDropDownList(id,fatherCtl)
{
if(!document.getElementById(id))
{
var ddl = document.createElement('select');
ddl.s ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......
/**
* CSSClass.js
*/
var CSSClass = {}; //Create our namespace object
//Return tru if element e is a member of the class c;false otherwise
CSSClass.is = fucntion(e, c)
{
if(typeof e == "string")
e = document.getElementById(e);
//Before doing a regexp search,optimize for couple of co ......