일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- appspresso
- swingx
- Ajax
- Struts
- jQuery
- Spring
- PLSQL
- 선택적조인
- WebLogic
- JSON
- iBATIS
- 전자정부프레임워크
- sencha touch
- MFC
- JDOM
- GPS
- rowspan
- ibsheet
- dock
- 가우스
- Android
- tomcat
- jsr 296
- node.js
- Google Map
- PHP
- phonegap
- Eclipse
- oracle
- MySQL
Archives
- Today
- Total
Where The Streets Have No Name
여러개의 검색조건 처리 본문
선택된 조건중 값이 비어있는것을 제외하고 값이 있는것만 조건비교를 처리
<script>
var findProdGroup = "a";
var findCate01 = "b";
var findCate02 = "";
var findCate03 = "";
var col0 = "a";
var col1 = "b";
var col2 = "c";
var col3 = "d";
if( col0 == (findProdGroup == ""?col0:findProdGroup) &&
col1 == (findCate01 == ""?col1:findCate01) &&
col2 == (findCate02 == ""?col2:findCate02) &&
col3 == (findCate03 == ""?col3:findCate03) )
alert(true);
else
alert(false);
</script>
<script>
var findProdGroup = "a";
var findCate01 = "b";
var findCate02 = "";
var findCate03 = "";
var col0 = "a";
var col1 = "b";
var col2 = "c";
var col3 = "d";
if( col0 == (findProdGroup == ""?col0:findProdGroup) &&
col1 == (findCate01 == ""?col1:findCate01) &&
col2 == (findCate02 == ""?col2:findCate02) &&
col3 == (findCate03 == ""?col3:findCate03) )
alert(true);
else
alert(false);
</script>