有一些我想放入JSFiddle的代碼。它沒有工作。縮小下來我甚至無法得到這個簡單的代碼工作:爲什麼這個簡單的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露面。
「沒有工作」 是沒有問題的描述。 –
可能的重複[簡單的例子不適用於JSFiddle](http://stackoverflow.com/questions/5431351/simple-example-doesnt-work-on-jsfiddle) – Xufox
@ thomasf1:請將您接受的答案更改爲更早和更完整https://stackoverflow.com/a/7043684/295783 – mplungjan