我想将一些代码放入 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 中。
最佳答案
关于javascript - 为什么这个简单的 JSFiddle 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7043649/