on

英[?n]   美[ɑ:n] ?

prep. (indicating direction) to; (indicating object) to; (indicating position) on...; (indicating time) at the time of...

adv. (put, wear, connect) on; forward, (continue) go on

adj. active situation, state ;Used;Occurring;Planned

error

UK[?er?(r)] US[??r?]

n. Error, negligence; [Law] mistrial, violation of law; [Number] Error

Plural: errors

javascript onerror attribute syntax

Function: Triggered when an error occurs during document or image loading. This event handler is called if an error occurs while loading the document or image.

Syntax: onerror="SomeJavaScriptCode"

Parameters: SomeJavaScriptCode Required. Specifies the JavaScript to be executed when this event occurs.?

javascript onerror attribute example

<html>
<body>

<img src="image.gif"
onerror="alert('圖片不存在')">

<p>在本例中,我們引用的圖片不存在,所以彈出一個(gè)提示框。</p>

</body>
</html>

Run instance ?

Click the "Run instance" button to view the online instance