HTML how to set the value of <input type = "number"> to infinity
I have an input number that I want to store in integers. If the value becomes negative, then I want the displayed character to be ∞ ( ∞).
Doing this does not work (a space is displayed instead of "∞"):
<%
if foo <= -1
v = '∞'
else
v = foo
end
%>
<input type="number" value="<%= v %>">
Is there a way to do this without resorting to javascript?
+4
2 answers