Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
No se puede leer el valor del texto de entrada en idioma árabe de la misma manera que escribí en Javascript

ingrese la descripción de la imagen aquí

Estoy tratando de leer el valor de un campo de texto de entrada ingresado en el idioma árabe usando javascript.

Pero como puede ver en la captura de pantalla, no obtiene el texto de la misma manera que lo escribí.

El número '123' que está en el lado derecho del campo de entrada salta al lado izquierdo cuando intento leer el valor del campo de entrada ingresado usando el código js.

Porfavor ayudame a resolver este problema.

A continuación se muestra el código que estoy usando:

 <!DOCTYPE html> <html lang="ar"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> html:lang(ar){ direction: rtl; } </style> </head> <body> <input type="text" dir="rtl" name="" id="textbox"> </body> </html>

Gracias por adelantado :)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Si genera el texto árabe RTL en la consola, se mostrará en la dirección LRT. Si genera el texto en otro campo Html con RTL configurado para ese campo, se mostrará correctamente

Aquí hay un ejemplo. La salida del texto árabe en otro campo se mostrará correctamente.

 <!DOCTYPE html> <html lang="ar"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> html:lang(ar){direction: rtl;} </style> </head> <body> <input type="text" id="inputText" oninput="outputIt()"> <div id="outputText"></div> </body> <script> function outputIt() { document.getElementById("outputText").innerHTML = document.getElementById("inputText").value; } </script> </html>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!