Skip to content Skip to sidebar Skip to footer

Troubles With Js Code

I have troubles with code which must display the image within a frame 300x300px. Also there must be an ability to zoom in and out image inside the frame by pressing the + and - on

Solution 1:

Use your console to debug Javascript. It's the F12 key on Firefox and Chrome, for Safari follow these instructions.

The image does not load because you have a syntax error line 23, a ; at the end of the definition of your keyDown function

Solution 2:

Finally I fully understood what's the problem: key codes 107(for zoom +) & 109 (for zoom -) are for windows keyboard. So I find information about codes of these keys for Mac (61 for zoom + & 173 for zoom -) and hopefully get what I want.

Realization

Post a Comment for "Troubles With Js Code"