Please try the following code:
<!DOCTYPE html><html><body><p>Click the button to display the date as a string.</p><button onclick="myFunction()">Try it</button><p id="demo"></p><script> function myFunction() { var d = new Date(); var n = d.toLocaleDateString("zh-cn", {year:"numeric", month:"long"}); document.getElementById("demo").innerHTML = n; }</script></body></html>
Expected Result:
2014年11月
Actual Result:
2014年11月月