일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- sencha touch
- Spring
- node.js
- JSON
- 선택적조인
- Ajax
- jQuery
- GPS
- JDOM
- jsr 296
- Struts
- MFC
- PLSQL
- swingx
- phonegap
- dock
- iBATIS
- rowspan
- Eclipse
- oracle
- Android
- 가우스
- appspresso
- Google Map
- ibsheet
- WebLogic
- 전자정부프레임워크
- tomcat
- PHP
- 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>