Skip to content

Commit 351ef5f

Browse files
Update README.md
1 parent 49767da commit 351ef5f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ Example:
504504
</form>
505505
```
506506

507-
## PostBack and GetBack and TagBack method and WebSocketBack
507+
## Interactive methods
508508

509509
`PostBack` and `GetBack` are two methods in WebFormsJS.
510510

@@ -558,3 +558,13 @@ Example:
558558
`WebSocketBack(event, "/YourURL")`
559559

560560
The above method creates a WebSocket connection to the path "/YourURL".
561+
562+
`PreventDefault` method prevents default browser behavior associated with specific tag-driven events
563+
564+
Example:
565+
566+
`PreventDefault(event)`
567+
568+
`<a href="https://example.com" id="myLink" onclick="PreventDefault(event)">Go to Example</a>`
569+
570+
Normally, clicking the link would take you to example.com. PreventDefault method stops that action and does something else—like showing an alert.

0 commit comments

Comments
 (0)