Possible Duplicate:
JavaScript equivalent to printf/string.format
Equivalent of String.format in JQuery
Is there any built javascript or jquery function that behaives like .net’s in string.format()?
Or like javascript’s console.log string repclament?
console.log(‘aString %s’, ‘valueToReplace’)
There is no native solution, but here is one of many partial solutions: http://monocleglobe.wordpress.com/2010/01/12/everybody-needs-a-little-printf-in-their-javascript/