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>
  • 相关阅读:
    IE下JS文件失效问题总结
    什么是RFC?
    CHROME对CSS的解析
    php_network_getaddresses: getaddrinfo failed
    Fedora10下配置Apache和虚拟主机
    Apache的Charset设置
    网页设计中的面包屑路径
    利用JS实现的根据经纬度计算地球上两点之间的距离
    【OpenCV学习】子矩阵操作
    【OpenCV学习】ROI区域
  • 原文地址:https://www.cnblogs.com/guanjie20/p/1895606.html
Copyright © 2011-2022 走看看