HTML
<ul>
<li rangeMinPrice="100000" rangeMaxPrice="20000">100000 ~ 200000<li>
<li rangeMinPrice="200000" rangeMaxPrice="30000">200000 ~ 300000<li>
<li rangeMinPrice="300000" rangeMaxPrice="40000">300000 ~ 400000<li>
<li rangeMinPrice="400000" rangeMaxPrice="50000">400000 ~ 500000<li>
<li rangeMinPrice="500000" rangeMaxPrice="60000">500000 ~ 600000<li>
</ul>
js - jquery
$('ul li').on('click', function(){
var rangeMinPrice = $(this).attr('rangeMinPrice');
var rangeMaxPrice = $(this).attr('rangeMaxPrice');
alert('rangeMinPrice : ' + rangeMinPrice + ' | rangeMaxPrice : ' + rangeMaxPrice);
});
jsfiddle : https://jsfiddle.net/h5Lbb8wv/
'js' 카테고리의 다른 글
[javascript] 나누기, 나머지, 몫 구하기 (0) | 2018.02.22 |
---|---|
[javascript] Uncaught TypeError: is not a function (0) | 2018.01.10 |
[javascript] get parameters to object (0) | 2017.12.28 |
[javascript] replace 에서 | or \| 차이 (0) | 2017.12.14 |
[javascript] replace all 할 때 (0) | 2017.09.04 |