jQuery¼¼Êõ

jQueryʵÏÖ¸´ÖƵ½Õ³Ìù°å¹¦ÄÜ

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2018-01-13 11:24 ÎÒÒªÆÀÂÛ( )

ÕâƪÎÄÕÂÖ÷ҪΪ´ó¼ÒÏêϸ½éÉÜÁËjqueryʵÏÖ¸´ÖƵ½Õ³Ìù°å¹¦ÄÜ£¬¾ßÓÐÒ»¶¨µÄ²Î¿¼¼ÛÖµ£¬¸ÐÐËȤµÄС»ï°éÃÇ¿ÉÒԲο¼Ò»ÏÂ

 

ÏîÄ¿ÖÐͻȻÐèҪʹÓø´Öƹ¦ÄÜ£¬ÔÚÍøÉÏËÑË÷ÁËÏ¿´µ½ÁËZeroClipboard²å¼þ£¬ºÃÓ㬵«ÊÇÒ²ÓоÖÏÞ¡£Ó÷¨ÈçÏ£º

1¡¢ÒýÓÃjquery¡¢zclip.js¡¢swfÎļþ¡£

demoµØÖ·£ºhttps://github.com/chaoli920029342/jquery_copy

2¡¢³õʼ»¯

<body> <input type="text" value="http://www.baidu.com" /> <a href="javascript:void(0)">¸´ÖÆ</a> <script type="text/javascript"> $(document).ready(function(){ $("#dynamic").zclip({ path:'ZeroClipboard.swf', copy:$('#text').val(), beforeCopy:function(){ //some code }, afterCopy:function(){ alert($("#text").val()); } }); //beforeCopy afterCopy ÊÇ¿ÉÑ¡Ïî }); </script> </body>

×¢£º

1¡¢ÐèÔÚ·þÎñÆ÷ÉÏÔËÐÐ localhost

2¡¢js+swfʵÏÖ£¬ÎļþÐèҪͬʱÒýÈë¡£ ZeroClipboardÌṩһ¸ö͸Ã÷µÄflash£¬ÓÃÓںͼôÇа潻»¥£¬µ±µã»÷Ò³ÃæÉϵē¸´ÖÆ”°´Å¥Ê±£¬½«ÐèÒªµÄÄÚÈÝ´«ÈëFlash£¬ÔÙͨ¹ýFlashµÄ¸´Öƹ¦ÄÜ°Ñ´«ÈëµÄÄÚÈݸ´ÖƵ½¼ôÌù°å¡£ Ðè±£Ö¤¸Ãflash±»ÕýÈ·¼ÓÔؼ´¿É¡£

3¡¢¿É¼æÈݸ÷´óä¯ÀÀÆ÷

ÒÔÉϾÍÊDZ¾ÎĵÄÈ«²¿ÄÚÈÝ£¬Ï£Íû¶Ô´ó¼ÒµÄѧϰÓÐËù°ïÖú£¬Ò²Ï£Íû´ó¼Ò¶à¶àÖ§³ÖÍø¹ÜÖ®¼Ò¡£

 

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • jQueryʵÏֵķÖ×ÓÔ˶¯Ð¡ÇòÅöײЧ¹û

    jQueryʵÏֵķÖ×ÓÔ˶¯Ð¡ÇòÅöײЧ¹û

    2017-12-21 13:22

  • jquery Ìí¼Ó²åÈëÔªËؼ¼ÇÉÇ°ÃæºÍºóÃæ

    jquery Ìí¼Ó²åÈëÔªËؼ¼ÇÉÇ°ÃæºÍºóÃæ

    2017-12-21 10:16

  • UI ѧϰ±Ê¼Ç(Ò») datepicker

    UI ѧϰ±Ê¼Ç(Ò») datepicker

    2017-12-20 18:36

  • ѧϰJQUERY¿ò¼ÜµÄÒ»µãСÐĵÃ_Íõ»Ô

    ѧϰJQUERY¿ò¼ÜµÄÒ»µãСÐĵÃ_Íõ»Ô

    2017-12-20 18:08

ÍøÓѵãÆÀ
½