实现功能的jquery代码$(function () { $(".box").find(".boxc_b").click(function () { var center = $(".boxc_c").text();//.appendTo("nextbox"); if (center == "") { alert("请输入内容喔!"); return; } $(".nextbox").prepend("" + "" + "" + year + "-" + month + "-" + day + " " + "" + hour + ":" + min + "" + "" + "" + "" + center + "" + ""); $(".boxc_c").text(""); }); //alert(1); $(".boxc_c").keydown(function (event) { var len = $(".boxc_c").text().length; if (len >70) { alert("够了,你别输入了,哪儿那么多话儿!"); } }); var dateDom = new Date(); //获取本地时间,年月日时分 var year = dateDom.getFullYear(); var month = dateDom.getMonth() + 1; var day = dateDom.getDate(); var hour = dateDom.getHours(); var min = dateDom.getMinutes();});
dd: