전체 글(39)
-
키움증권 openAPI 18번 - 종목코드의 감리구분을 반환한다.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import sys from PyQt5.QtWidgets import * from PyQt5.QAxContainer import * from PyQt5.QtCore import * class Kiwoom(QAxWidget): def __init__(self): super().__init__() self._create_kiwoom_instance() self._set_signal_slots() def _create_kiwoom_instance(self): self.setControl(..
2023.01.18 -
키움증권 openAPI 17번 - 종목코드의 상장주식수를 반환한다.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import sys from PyQt5.QtWidgets import * from PyQt5.QAxContainer import * from PyQt5.QtCore import * class Kiwoom(QAxWidget): def __init__(self): super().__init__() self._create_kiwoom_instance() self._set_signal_slots() def _create_kiwoom_instance(self): self.setControl(..
2023.01.18 -
엔터키 입력시 폼 전송하기
1 2 3 4 5 6 $("#search_text").keyup(function(e){ e.preventDefault(); if ((e.keyCode) === 13) { send_form(); // 사용자 정의 함수 호출 } }); Colored by Color Scripter cs input 태그에서 엔터키가 입력되면 senf_form()을 호출한다. 이 와는 별개로 입력 홈에서 엔터키를 입력하면 폼이 자동으로 전송되는 경우가 있다. 주로 form 태그가 두 개 이상인 페이지에서 발생한다. form과 form 을 확실히 구분해 주지 않은 경우 발생하며 도저히 수정이 불가한 경우에는 해당 form 태그를 삭제하고 ajax로 폼을 처리하면 해결되기도 한다.
2023.01.18 -
javascript 연락처 입력 받기
// 연락처 [숫자, -]만 허용 $("#orderPhone").keyup(function(){ var regex = /[^0-9\-]/g; var tmp = $(this).val().replace(regex, ""); regex = /[^0-9]/g; tmp = tmp.replace(regex, ""); if(tmp.length > 8){ var tmp1 = tmp.substr(0,3); var tmp2 = tmp.substr(3,4); var tmp3 = tmp.substr(7); tmp = tmp1+"-"+tmp2+"-"+tmp3; }else if(tmp.length > 3){ var tmp1 = tmp.substr(0,3); var tmp2 = tmp.substr(3); tmp = tmp1+"-"..
2023.01.18 -
키움증권 openAPI 16번 - 종목코드의 종목명을 반환한다
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 32 33 34 35 36 37 38 39 40 41 42 import sys from PyQt5.QtWidgets import * from PyQt5.QAxContainer import * from PyQt5.QtCore import * class Kiwoom(QAxWidget): def __init__(self): super().__init__() self._create_kiwoom_instance() self._set_signal_slots() def _create_kiwoom_instance(self): self.setControl("KHOPENAP..
2023.01.18 -
키움증권 openAPI 15번 - 현재접속상태를 반환한다.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import sys from PyQt5.QtWidgets import * from PyQt5.QAxContainer import * from PyQt5.QtCore import * class Kiwoom(QAxWidget): def __init__(self): super().__init__() self._create_kiwoom_instance() self._set_signal_slots() def _create_kiwoom_instance(self): self.setControl(..
2023.01.17