RosettaCodeData/Task/User-input-Text/Lambdatalk/user-input-text.lambdatalk

18 lines
473 B
Plaintext

{input
{@ type="text"
placeholder="Please enter a string and dblclick"
ondblclick="alert( 'You wrote « ' +
this.value +
' » and it is ' +
((isNaN(this.value)) ? 'not' : '') +
' a number.' )"
}}
Please enter a string and dblclick
Input: Hello World
Output: You wrote « Hello World » and it is not a number.
Input: 123
Output: You wrote « 123 » and it is a number.