<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
link
rel
=
"stylesheet"
href
=
"jqwidgets/styles/jqx.base.css"
type
=
"text/css"
/>
<
script
type
=
"text/javascript"
src
=
"scripts/jquery-1.11.1.min.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"jqwidgets/jqxcore.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"jqwidgets/jqxdraw.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"jqwidgets/jqx-all.js"
></
script
>
</
head
>
<
body
>
<
center
>
<
h1
style
=
"color:green;"
>
GeeksforGeeks
</
h1
>
<
h3
>jQWidgets jqxDraw clear() Method</
h3
>
<
div
id
=
"jqx_Draw"
style
=
"height:200px; width:280px;"
>
</
div
>
<
input
type
=
"button"
id
=
"Button_for_clear"
style
=
"padding:5px 15px; margin-top:40px;"
value
=
"Clear the content of the widget"
>
<
script
type
=
"text/javascript"
>
$(document).ready(function () {
$('#jqx_Draw').jqxDraw({
renderEngine: 'HTML5'
});
var Instance = $('#jqx_Draw').jqxDraw('getInstance');
Instance.circle(150, 100, 65, { fill: 'green' });
Instance.refresh();
$("#Button_for_clear").jqxButton();
$("#Button_for_clear").click(function () {
Instance.clear();
Instance.refresh();
});
});
</
script
>
</
center
>
</
body
>
</
html
>