使用方法很简单,直接看代码:
<!DOCTYPE HTML>
<head>
<title> html中嵌入JavaScript </title>
</head>
<body>
<script type='text/javascript'>
function helloworld()
{
alert("Hello World");
}
helloworld();
</script>
</body>
这样在浏览器就能弹出"Hello World"了。
使用方法很简单,直接看代码:
<!DOCTYPE HTML>
<head>
<title> html中嵌入JavaScript </title>
</head>
<body>
<script type='text/javascript'>
function helloworld()
{
alert("Hello World");
}
helloworld();
</script>
</body>