I want javascript for Image captcha in html code. Whcih generates images dynamically and match the given character with image characters. Before entering into the new page it should have to check whether both are same
Whilst you could conceivably write some shapes to a <canvas>, SVG or VML element — or even (on non-IE browsers) create an image with a ‘data:’ URL created from pixel values — there is no point.
Any wholly client-side approach to captcha is already compromised because it needs to know the ‘right’ answer to check against. An attacker can just run the JavaScript themselves to find out the answer. Or just turn JavaScript off to avoid the checks.
To do captchas you need server-side scripting, which the attacker does not have access to, to do the work.