2011-01-12 50 views
-1
<script type="text/javascript"> 
alert("message function"); 
function message() 
{ 
alert("This alert box was called with the onload event"); 
} 
</script> 

是否有可能就在主脚本代码的编写alert("message function");是否可以在javascript函数之外编写警报消息?

+0

你的问题很不清楚......你的意思是在之后有javascript?尝试在这里编写整个HTML。 – turtlepick 2011-01-12 06:09:18

回答

0

标签内的任何脚本或脚本相关函数都会被浏览器解释!否则它将是纯文本内容,除非直到被html标记包围为止

0

您可以将它们写入HTML。我不认为你需要分号。另外请注意,标签是从帖子中删除的。

相关问题