如何将Var变量(具有日期)转换为Int变量。? [英] How Do I Convert Var Variable (Having Date ) Into Int Variable.?

查看:98
本文介绍了如何将Var变量(具有日期)转换为Int变量。?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,..



<前lang =cs> var dt = < span class =code-keyword> new Date();
var a = new Date(dt).toLocaleString();
alert(a);





我在上面的代码中使用...这里我想要var变量为int变量因为我想把它发送到数据库(这是日期时间格式)..任何人都可以帮助我..?

解决方案

这是获取客户端时间戳的脚本:



 alert( Date  .now()); 


Hello friends,..

var dt = new Date();
       var a = new Date(dt).toLocaleString();
       alert(a);



I used above code ...here i wanted the var variable to int variable because i wanted to send it to database(which is in datetime format)..Can anybody help me ..?

解决方案

Here is the script to get time stamp client side:

alert(Date.now());


这篇关于如何将Var变量(具有日期)转换为Int变量。?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆