JSoup - Add onclick function to the anchor href

Viewed 1477

Existing HTMl Document

<a href="http://google.com">Link</a>

Like to convert it as:

<a href="#" onclick="openFunction('http://google.com')">Link</a>

Using JSoup Java library many fancy parsing can be done. But not able to find clue to add attribute like above requirement. Please help.

2 Answers
Related