【发布时间】:2011-10-25 23:56:58
【问题描述】:
我想将一些代码放入 JSFiddle。它没有用。缩小范围,我什至无法让这个最简单的代码工作:
function displaymessage() {
alert("Hello World!");
}
<form>
<input type="button" value="Click me!" onclick="displaymessage()" />
</form>
<p>By pressing the button above, a function will be called. The function will alert a message.</p>
alert 框不会出现在 JSFiddle 中。
【问题讨论】:
-
“没用”不是问题描述。
-
@thomasf1:请将您接受的答案更改为较早且更完整的答案stackoverflow.com/a/7043684/295783
标签: javascript html jsfiddle