html页面根据js名称调用需要的js

html页面根据js名称调用需要的js

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

 

html页面根据js名称调用需要的js
ExpandedBlockStart.gif
代码

<!
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
>

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/110685.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号