<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    滲透測試如何查看 jQuery 組件版本


    發現錯別字 2年前 提問
    回答
    1
    瀏覽
    424
    請勿發布不友善或者負能量的內容。與人為善,比聰明更重要!
    回答數量: 1
    風險管理(專業級)RM/PL 高級信息系統項目管理師

    方法1:使用$().jquery

    示例:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
    </head> 
    
    <body>
        <script src="https://code.jquery.com/jquery-3.3.1.min.js"> </script>
        <script> 
            $(document).ready(function() { 
                    alert("運行的jquery版本是:" + $().jquery); 
    
            }); 
        </script> 
    </body> 
    
    </html>

    方法2:使用$.fn.jquery

    .jquery 屬性是通過 jQuery 原型賦值的,通過使用它的別名 $.fn 進行引用。它是一個含有 jQuery 版本號的字符串,例如 “1.5.0” 或 “1.4.4”.

    示例:取得頁面上當前使用的 jQuery 的版本號

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
    </head> 
    
    <body>
        <script src="https://code.jquery.com/jquery-3.3.1.min.js"> </script>
        <script> 
            $(document).ready(function() { 
                    alert("正在運行的jquery版本:" + $.fn.jquery); 
    
            }); 
        </script> 
    </body> 
    
    </html>

    回答所涉及的環境:聯想天逸510S、Windows 10。

    2年前 / 評論
    亚洲 欧美 自拍 唯美 另类