Answers for "js element to string"

15

javascript to string

num.toString();
Posted by: Guest on October-04-2020
1

convert element to html string

html_entity_decode

$temp = "<font class='red font-price'> 30 </font>";
echo html_entity_decode($temp);
Posted by: Guest on November-09-2020
0

how to convert to string javascript

function myFunction() {
  var x1 = Boolean(0);
  var x2 = Boolean(1);
  var x3 = new Date();
  var x4 = "12345";
  var x5 = 12345;

  
  console.log(String(x1))
  console.log(String(x2))
  console.log(String(x3))
  console.log(String(x4))
  console.log(String(x5))

}

//outputs the following: 

false
true
Wed Dec 30 2020 20:35:17 GMT-0500 (Eastern Standard Time)
12345
12345
Posted by: Guest on December-31-2020

Browse Popular Code Answers by Language