Write function distance, which calculates the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be floating-point values. Incorporate this function into a script that enables the user to enter the coordinates of the points through an HTML form.
What will be an ideal response?
```
1
2
3
4
5
6
7
8
9
25
26
27
28