1
如何添加搜索運算符而不直接插入文件jquery.jqGrid.src.js
?jqGrid添加自定義搜索運算符(ops對象)
例如:
ops: [
{"name": "eq", "description": "equal", "operator": "="},
{"name": "ne", "description": "not equal", "operator": "<>"},
{"name": "lt", "description": "less", "operator": "<"},
{"name": "the", "description": "less or equal", "operator": "<="},
{"name": "gt", "description": "greater", "operator": ">"},
{"name": "ge", "description": "greater or equal", "operator": "> ="},
{"name": "bw", "description": "begins with", "operator": "LIKE"},
{"name": "bn", "description": "does not begin with", "operator": "NOT LIKE"},
{"name": "in", "description": "in", "operator": "IN"},
{"name": "ni", "description": "not in", "operator": "NOT IN"},
{"name": "ew", "description": "ends with", "operator": "LIKE"},
{"name": "en", "description": "does not end with", "operator": "NOT LIKE"},
{"name": "cn", "description": "contains", "operator": "LIKE"},
{"name": "nc", "description": "Does not contain", "operator": "NOT LIKE"},
{"name": "noo", "description": "is null", "operator": "IS NULL"},
{"name": "nn", "description": "is not null", "operator": "IS NOT NULL"},
{"name": "xx", "description": "xxx", "operator": "CUSTOM"} ]
這種變化可以正常工作,但你可以與外部文件做呢?