我怎樣才能把變量轉換爲JSON 見例如需要把變量轉換成目標
$('.thermometer-noconfig').thermometer({
percent: 10,
speed: 'slow'
})
/* thermometers with config */
$('.thermometer-config').thermometer({
percent: 10,
speed: 'slow'
})
我需要的不是一個數字「10」,我需要把可變測試 我如何能做到這一點,請大家幫幫我
你試過用'test'代替'10'嗎? – adeneo
另外,這不是json,這些是javascript對象文字。 –