NepUS
NepUS

Reputation: 1989

How to insert a draw box in my html code?

I'm creating a web page, and I can't (with html code) add a draw box*?

*It's a box, like a Microsoft Paint, only with one brush, where the user make a draw by a click draged.

Upvotes: 1

Views: 4396

Answers (3)

Steve Harrison
Steve Harrison

Reputation: 125590

The following links may be helpful:

Also, have a look at this Stack Overflow thread: Drawing on top of an image in Javascript.

Upvotes: 4

Sean Vieira
Sean Vieira

Reputation: 159995

I'm afraid there is no simple way to do what you want to do. The current version of HTML (4.01, I believe) does not support this at all. HTML 5, which is still in development, has a <canvas> element that can be used with javascript to create the kind of thing you are looking for, but only the latest versions of Firefox, Chrome, Opera, and Safari support it.

See: w3schools.com/tags/html5_canvas.asp for an explanation of the <canvas> element and dev.w3.org/html5/spec/#the-canvas-element for the full (uncompleted) specs.

See: http://devfiles.myopera.com/articles/649/example1.html for an example of the kind of design you are looking for.

Upvotes: 1

Jason Berry
Jason Berry

Reputation: 2469

There's no HTML element that's a "draw box". You'll need to find something built in JavaScript/Flash/Java and drop it into your page.

Try CanvasPaint or this other Canvas Painter.

Upvotes: 0

Related Questions