HTML:
<select>
<option>Select an item</option>
<option data-price="20.00" value="1">Item 1</option>
<option data-price="15.00" value="2">Item 2</option>
<option data-price="24.00" value="3">Item 3</option>
</select>
<input type="text" id="price">
JavaScript (с помощта на jQuery):
$('select').on('change', function() {
$("select option:selected").each(function () {
$('#price').val('$' + $(this).attr('data-price'));
});
});
И вижте този jsFiddle за работещ пример:http://jsfiddle.net/chnUn/