skip to Main Content

Javascript concatenate select and input values in a text box – Jquery

I'd like to concatenate several values from selects and input fields on a final input field that contain all the values. What I have until now is this: $('#chosen_a').change(function() { $('#ddlNames').val($('#chosen_a option:selected').data('id')); console.log($('#chosen_a option:selected').data('id')); }) <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <select name="criteria_title" id="chosen_a"…

VIEW QUESTION

Delete last 5 characters from HTML content – Jquery

I have this code (assume unable to modify) <div class="parent"> <div class="wrap"> <span class="content">2026-01-31-08:00</span> </div> <div class="wrap"> <span class="content">2025-03-34-06:00</span> </div> <div class="wrap"> <span class="content">N/A</span> </div> <div class="wrap"> <span class="content">N/A</span> </div> </div> The "2026-01-31-08:00" are supposed to be dates, "N/A" should…

VIEW QUESTION
Back To Top
Search