<!--方法一:通过外部源文件来包含javascript,这是最正确的方式,把结构从行为中分离出来-->
<head>
<script type=”text/javascript”src=”source.jsp”></script>
</head>
<!--方法二:在<head>中包含js代码-->
<head>
<script type=”text/javascript”>
//JavaScript代码
</script>
</head>
<!--方式三:把嵌入式的脚本添加到文档的<body>中,维一的理由是要使用document.write()方法,但我们有更好方法来替代他。如:createElement()方法, appendChild()方法, 非EMCAscript标准的 innerHTML属性-->
<body>
<script type=”text/javascript”>
document.write(“html....”);
</script>
</body>
<!--方式四:非官方EMCA标准的 javascript:前缀 ;可以成功打开一个新的窗口-->
<a href="javascript:window.open('http://www.google.com');" >进入</a>
经典笔试题-在HTML中如何包含JavaScript?
原创wx5d0241bb88268 博主文章分类:经典笔试题 ©著作权
文章标签 在HTML中如何包含JavaScript javascript html 源文件 嵌入式 文章分类 JavaScript 前端开发
-
经典笔试题笔记
1. 有无序的实数列V[N],要求求里面大小相邻的实数的差的最大值,关键是要求
#include #define 数组 -
经典4道笔试题
经典笔试题
Test #include 野指针 -
安装docker用的Mono是什么
什么是MinioMinio是Apcche旗下的一款开源的轻量级文件服务器,基于对象存储,协议是基于Apache License v2.0,开源可用于商务。Minio主要用来存储非结构化的数据,类似文件,图片,照片,日志文件,各类备份文件等,按照官网描述,文件的大小从几KB到5TB。Minio提供了非常方便,友好的界面,并且文档也是非常丰富,具体可以参考它的docshttps://do
安装docker用的Mono是什么 docker安装fastdfs jackson 读取多文件 spring apache