JavaScript基础教程

文章39 |   阅读 11505 |   点赞0

来源:https://blog.csdn.net/u011541946/category_6887610.html

JavaScript学习笔记10-函数中调用其他函数

x33g5p2x  于2022-03-06 转载在 其他  
字(0.5k)|赞(0)|评价(0)|浏览(324)

本文记录下,在JavaScript中函数中如何调用其他函数的基本写法和用法,直接看一下demo.html

<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
</head>
<body>
<script type ="text/javascript">
	function doFirst(){
		document.write("第一个函数");
	}
	function doSecond(){
		document.write("第二个函数");
	}
	function start(){
		doFirst();
		doSecond();
	}
	start();
</script>
</body>
</html>

相关文章