zoukankan      html  css  js  c++  java
  • html页面根据js名称调用需要的js

    小功能,不过还比较有用,其他的类似功能都一样。

    代码
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        
    <title测试</title>
      
    </head>
    <body style="background: none">
        
    <!--question S-->
        
    <div class="question" style="position: relative">
           
    <div  title="测试">
            
    </div>
            
    <div class="question_con">
                
    <div class="question_con_in">
                    
    <script type="text/javascript">
                        window.onload 
    = function () {
                            var url 
    = window.location.href;
                            var jsname 
    = url.split("?")[1];
                            load(jsname);
                        }
                        function load(js) {
                            document.write(
    "<script src='http://www.test.com/html/");
                            document.write(
    "" + value + "'");
                            document.write(
    " type=\"text/javascript\" charset=\"utf-8\" <\/script>");
                        }
                    
    </script>
                
    </div>
            
    </div>
         
    </div>
       
    </body>
    </html>
  • 相关阅读:
    Max Sum Plus Plus_DP
    Prime Ring Problem_DFS
    Swaps in Permutation _并查集 + 优先队列
    Roadblocks_次短路
    Reward_toposort
    确定比赛名次_toposort
    Zipper_DFS
    Chopsticks_DP
    搬寝室_DP
    Passing the Message_单调栈
  • 原文地址:https://www.cnblogs.com/guanjie20/p/1895606.html
Copyright © 2011-2022 走看看