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

186
Views
In js, how to set button caption with css characters

I want to create dynamically a button with css symbol as caption.
I want to put a small arrow.
I try this, without success:

let btnDel = document.createElement("input");
btnDel.type = "button";
btnDel.value = "⇧";

A nudge ?

Best regards

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

0

Since it's a JavaScript string, you use a JavaScript Unicode escape sequence rather than an HTML character entity:

btnDel.value = "\u21E7";

let btnDel = document.createElement("input");
btnDel.type = "button";
btnDel.value = "\u21E7";
document.body.appendChild(btnDel);

("del" seems like "delete," though. I wouldn't expect an up-arrow to delete anything.)

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!