The problem is specific to JSFiddle. You need to change the LOAD TYPE
to No wrap - bottom of <body>
.
When using onLoad, the function won't become global one, so you can't invoke it directy from HTML. If it is global - like when using no-wrap - it works.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…