内部引用:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
document.write("Hello World!");
</script>
</head>
</html>
外部引用:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/hello.js">
</script>
</head>
</html>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
document.write("Hello World!");
</script>
</head>
</html>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/hello.js">
</script>
</head>
</html>
本文标题:JS的内部和外部引用(练习)
本文链接:https://www.haomeiwen.com/subject/qiyozxtx.html
网友评论