PyScript Sample Page

Check if interger

If you want to get more information, please click this link.

# Selecting JS element for Value / Text Input_Value_Box = Element("InputFieldValueBox") # Needs an argument passed - don't ask me why! def check_if_interger(test): # Getting The Value Of The Text input_text = Input_Value_Box.element.value if input_text.isnumeric(): pyscript.write('sum',input_text + " is a interger") else: pyscript.write('sum',input_text + " is not a interger")