분류 전체보기172 How to check if a variable is an integer in JavaScript? function isValidInteger(value) { return !isNaN(value) && parseInt(Number(value)) == value && !isNaN(parseInt(value, 10)); } hat depends, do you also want to cast strings as potential integers as well?This will do:function isInt(value) { return !isNaN(value) && parseInt(Number(value)) == value && !isNaN(parseInt(value, 10)); }With Bitwise operationsSimple parse and checkfunction isInt(value) { va.. 2017. 9. 10. jquery dialog position $("#dialog").dialog({ position: { my: "top+25", at: "top+25" } }); $(".mytext").mouseover(function() { var target = $(this); $("#dialog").dialog("widget").position({ my: 'left', at: 'right', of: parent //주의 : 모바일 웹에서는 동작 안할 수 있음 }); } 2017. 8. 30. ul 태그 안에 있는 li 지우기 ( Remove ul tag child) function removeSidoInternalInfoli() { var ul = document.getElementById('sidoInternalList'); if (ul) { while (ul.firstChild) { ul.removeChild(ul.firstChild); } } } 2017. 8. 30. json jquery populate each example function showSidoInternalInfo(jsonResult) { var jsonSidoData = JSON.parse(jsonResult); console.log('showSidoInternalInfo : ' + jsonSidoData); var items = []; items.push(' [지역 이름 | 상태] Pm10/Pm25/오존 '); $.each(jsonSidoData.list, function (i, item) { console.log("name : " + item.cityName + ", value : " + item.pm10Value); var status = calStatusIndex(item.pm10Value, item.pm25Value); var statusText = .. 2017. 8. 30. 이전 1 ··· 16 17 18 19 20 21 22 ··· 43 다음