Search...
onChange( )
Adds an event handler that runs when a signature input element's value is changed by a site visitor.
Description
A signature input element receives a change
event when a site visitor changes its value.
A change
event is not triggered when:
- You, the site owner, change an element's value using the
clear()
function. - The signature input field is empty, and the site visitor clears the signature.
Syntax
function onChange(handler: EventHandler): SignatureInputhandler: function EventHandler(event: Event): void
onChange Parameters
NAME
TYPE
DESCRIPTION
handler
The name of the function to run when the signature input element's value changes.
EventHandler Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Get the value of the signature input element that was changed
Copy Code
1$w("#mySignatureInputElement").onChange( (event) => {2 let newValue = event.target.value; // "new value"3});