您可以尝试使用Javascript日期:$("creation-from-date").val(new Date().toLocalString());// toLocalString() will return the local time while toISOString() will return the UTC time.这里是一个不错的jQuery扩展,对于初始化datetime和datetime-local输入非常有用:// To initialize, simply call the method:$('input[type="datetime-local"]').setNow();