Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

55
Views
How to initialize the input text in case of korean? (the last letter remains)

In case of let a = 'abc' (English), the input text is initialized. But, in case of let a = '돈까스' (Korean), the last letter remains as in the picture below.

$(function () {
    $('.input').on('input', clear);
});

let a = '돈까스';


function clear(event) {
    var Input_Text = event.currentTarget.value;
    if (a === Input_Text) {
        $('.input').val('');
        
    }
}

enter image description here

7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs