Unless there's a simpler imlementation of a legend that works in Interactive HTML, this complicated solution might work.
Let's say you have "age" in your legend. You can create a bar chart coloring by age to simulate a legend. In JMP when you click on a bar in the bar chart, the points with the same age will be selected in your other plot. If you create a dashboard and save it as Interactive HTML or publish it to JMP Public, you will have the same legend-like behavior.
This is what the dashboard looks like as Interactive HTML:
I published the dashboard to JMP Public at https://public.jmp.com/packages/Interactive-Legend/js-p/5cf50b6c8d935302b443bfff so you can try it there and download the script that builds the dashboard.
You can also try it below.
~John