본문 바로가기
반응형

분류 전체보기799

checkbox array jquery ajax html, php 코드 Select your favorite fruits: Apple Banana Mango Grapes Submit $(document).ready(function() { $("#submit-button").click(function() { var selectedFruits = []; $("input[name='fruits']:checked").each(function() { selectedFruits.push($(this).val()); }); $.ajax({ type: "POST", url: "process-fruits.php", data: {fruits: selectedFruits}, success: function(response) { $("#response").html(response); } }); .. 2023. 2. 8.
CodeIgniter DB update // Load the database library $this->load->database(); // Set the data to be updated $data = array( 'column1' => 'value1', 'column2' => 'value2', 'column3' => 'value3' ); // Set the conditions for the update $this->db->where('id', $id); // Perform the update $this->db->update('table_name', $data); 2023. 2. 8.
AdminLTE 템플릿 select 선택 하여 input 컴포넌트 추가, 삭제 하기 Select an option Option 1 Option 2 Option 3 동적으로 생성된 입력 구성 요소를 추적하기 위해 글로벌 입력 변수를 사용. 선택 상자 값이 변경되면 .value를 사용하여 값을 얻고, 값이 비어 있으면 입력 구성 요소가 생성되었는지 확인. 값이 있는 경우 removeChild 메서드를 사용하여 inputContainerdiv에서 제거하고 입력 변수를 null로 설정. 값이 비어 있지 않으면 입력 구성 요소가 생성되었는지 확인. 2023. 2. 8.
select 선택 div 보이기 사라지기 Javascript 이용 방법: HTML Option 1 Option 2 Option 3 This is Option 1 content This is Option 2 content This is Option 3 content Javascript document.getElementById("selectOption").addEventListener("change", function() { var selectedOption = this.value; document.getElementById("option1").style.display = "none"; document.getElementById("option2").style.display = "none"; document.getElementById("option.. 2023. 2. 8.
반응형