Display a variable when a select box option is selected

Posted by user782104 on Stack Overflow See other posts from Stack Overflow or by user782104
Published on 2012-04-12T17:17:01Z Indexed on 2012/04/12 17:28 UTC
Read the original article Hit count: 218

Filed under:
|
|

For example, the select box

<select><option selected="" value="">Please Select</option><option value='txt'>Text</option><option value='int'>Numbers</option><option value='bool' >Boolean</option></select>

has a string

$messageList=array ( 'txt'=>'text message', 'int'=>'int message','bool'=>'bool message');

What i would like to achieve is to display correspond message when the optition is select?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery