如果有一个数据库含有名称、单价、数量字段,当Select选择名称时,一个文本框显示单价、一个显示数量,怎么写??
---------------------------------------------------------------
1<form>
2<select onchange="this.form.quantity=this.options[this.selectedIndex].getAttribute('quantity');this.form.price=this.options[this.selectedIndex].getAttribute('price'); ">
3<option price="单价" quantity="数量">名称</option>
4</select>
5<input name="quantity"/>
6<input name="price"/>
7</form>