0

I want to print triangular image using javascript. Using HTML it will come like this

All Coupons & Deals ▼

Using JavaScript I did not get an any output

textContent="All Coupons & Deals ▼  ";
5
  • textContent = "All Coupons & Deals ▼"; Commented Oct 3, 2016 at 11:15
  • stackoverflow.com/questions/14937169/… Commented Oct 3, 2016 at 11:17
  • @PedroLobito Er... Not dupe of it. :) Commented Oct 3, 2016 at 11:18
  • 2
    I never said it was a dupe Commented Oct 3, 2016 at 11:18
  • @PedroLobito You got me there. Not fair... ;) Commented Oct 3, 2016 at 11:26

1 Answer 1

2

Either use innerHTML (coz that's not a text):

document.getElementById("myDiv").innerHTML="All Coupons & Deals ▼";
<div id="myDiv"></div>

Or try it with the Unicode:

document.getElementById("myDiv").textContent = "All Coupons & Deals ▼";
<div id="myDiv"></div>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.