<!DOCTYPE html>
<
html
>
<
head
>
<
script
type
=
"text/javascript"
src
=
"prototype.js"
>
</
script
>
<
script
type
=
"text/javascript"
src
=
"scriptaculous.js?load = controls"
>
</
script
>
<
script
type
=
"text/javascript"
>
window.onload = function () {
// Default InPlaceEditor with no
// options
new Ajax.InPlaceEditor(
'editableElement',
);
// InPlaceEditor where the
// cancelText option is modified
new Ajax.InPlaceEditor(
'editableElement2',
{
// Specify the text to be used for
// the link to cancel the edit
cancelText: "Press to cancel!"
}
);
}
</
script
>
</
head
>
<
body
>
<
h1
style
=
"color: green"
>
GeeksforGeeks
</
h1
>
<
h2
>InPlaceEditor cancelText Option</
h2
>
<
p
>
The "cancelText" option is used to
specify the text to be shown for the
cancel option of the editor.
</
p
>
<
b
>
This element has the cancelText
as the default one.
</
b
>
<
div
id
=
"editableElement"
>
Click this element to edit it!
</
div
>
<
br
>
<
b
>
This element has the cancelText
set to a custom value.
</
b
>
<
div
id
=
"editableElement2"
>
Click this element to edit it!
</
div
>
</
body
>
</
html
>