在这里,我试图获得跨度值1这里.text()显示适当的值,但.val()没有显示任何
<span class="commentpageno" id="commentpageno_1111" style="visibility: hidden">1</span>
$('.commentpageno').click(function (e) {
alert($('.comment_page_no').text());
alert($('.comment_page_no').val());
});
Run Code Online (Sandbox Code Playgroud) 我正在使用以下函数来计算时差.它没有显示正确的输出.1个月的时差后,它显示出2分钟的差异.
我的计划有什么问题?
public String TimestampDiff(Timestamp t) {
long t1 = t.getTime();
String st = null;
long diff;
java.util.Date date = new java.util.Date();
long currT = date.getTime();
System.out.println();
System.out.println(" current timesstamp is " + currT);
diff = (currT - t1) / 60;
int years = (int) Math.floor(diff / (1000 * 60 * 60 * 24 * 365));
double remainder = Math.floor(diff % (1000 * 60 * 60 * 24 * 365));
int days = (int) Math.floor(remainder / (1000 * 60 * …Run Code Online (Sandbox Code Playgroud)