---
title: "关于ext form.combobox  不能手动写入"
author: "liyanhui"
date: "2009-07-31T11:59:40Z"
tags: ["EXT"]
categories: ["Web前端"]
slug: "ext-form-combobox"
draft: false
lastmod: "2009-07-31T11:59:40Z"
id: 436926
url: "https://liyanhui.iteye.com/blog/436926"
---

在使用combobox 这个组件使，要防止客户乱输入，除了必备的校验外，使下拉框不能手动输入也是个选择：

editable:fasel(不能输入);editable:true(可以输入)

```
	//职位分类选择框
	posClassCom[addrindex] = new Ext.form.ComboBox({
		width:250, 
		hiddenName:'positionClass',
		id:'pos'+addrindex,
		store:PositionClassStore,
		displayField:'name',
		valueField:'id',
	    editable:false  ,
		mode: 'local',
		triggerAction: 'all',
		selectOnFocus:true
	});
```