Horje
how to convert variable to string in jquery Code Example
jquery cast to string
value.toString()
String(value)
value + ""
convert jquery to string
var $elem = $('<a rel="nofollow" href="#">Some element</a>');
console.log("HTML is: " + $elem.get(0).outerHTML);
how to convert variable to string in jquery
function myFunction() {
    var y = document.getElementById("txt1").value;
    var z = document.getElementById("txt2").value;
    var x = parseInt(y) + parseInt(z);
   // document.getElementById("demo").innerHTML = x;
  document.getElementById("txt3").value= x;
  var elem = document.querySelector('#txt3');

  if(x < 50)
// Set color to purple
elem.style.color = 'red';
 else
     // Set color to purple
elem.style.color = 'green';
  }

 




Javascript

Related
how to style svgs in react Code Example how to style svgs in react Code Example
service erstellen angular Code Example service erstellen angular Code Example
moment js locale Code Example moment js locale Code Example
vue shortcut to create component Code Example vue shortcut to create component Code Example
nuxt js index.html not found Code Example nuxt js index.html not found Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9