Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

turn string into number javascript

$("#link").attr("href");                    // get an attribute
$("#link").attr("href",'https://htmlg.com'); // set attribute
$("#link").attr({
"href" : "https://htmlg.com",            // setting multiple attributes
"title" : "HTML Editor"
});
$("#link").attr("href", function(i, origValue){
return origValue + "/help";             // callback function gets and changes the attribute
});
Source by htmlcheatsheet.com #
 
PREVIOUS NEXT
Tagged: #turn #string #number #javascript
ADD COMMENT
Topic
Name
4+6 =