zoukankan      html  css  js  c++  java
  • jQuery 与 prototype 共存

    方法一:

    <html>  
     <head> 
       <script src="prototype.js"></script> 
       <script src="jquery.js"></script> 
       <script> 
         jQuery.noConflict();  
           
         // Use jQuery via jQuery(...)  
         jQuery(document).ready(function(){  
           jQuery("div").hide();  
         });  
           
         // Use Prototype with $(...), etc.  
         $('someid').style.display = 'none';  
       </script> 
     </head> 
     <body></body> 
     </html>

    方法二:

    <html>  
     <head> 
       <script src="prototype.js"></script> 
       <script src="jquery.js"></script> 
       <script> 
         var $j = jQuery.noConflict();  
           
         // Use jQuery via $j(...)  
         $j(document).ready(function(){  
           $j("div").hide();  
         });  
           
         // Use Prototype with $(...), etc.  
         $('someid').style.display = 'none';  
       </script> 
     </head> 
     <body></body> 
     </html> 

    方法三:

    <html>  
     <head> 
       <script src="prototype.js"></script> 
       <script src="jquery.js"></script> 
       <script> 
         jQuery.noConflict();  
           
         // Put all your code in your document ready area  
         jQuery(document).ready(function($){  
           // Do jQuery stuff using $  
           $("div").hide();  
         });  
           
         // Use Prototype with $(...), etc.  
         $('someid').style.display = 'none';  
       </script> 
     </head> 
     <body></body> 
     </html> 
  • 相关阅读:
    erlang使用gen_server实现质数服务器(手打代码,还debug了几个错误)
    Java
    某个数组,通过交换使所有奇数都在前半所有偶数都在后半,复杂度O(N)。
    Mybatis映射文件完整模板参照
    Spring集成MyBatis
    jdbc hibernate myBatis比较
    MySQL的简单使用-(一)
    jQuery框架Ajax常用选项
    POI操作Excel的API注意点总结
    Java反射机制练习
  • 原文地址:https://www.cnblogs.com/xiaochao12345/p/4191541.html
Copyright © 2011-2022 走看看