JavaScript 日历
html:
<html>
<head>
<title>calendaragain</title>
<link rel=stylesheet href="calendaragain.css">
<script type = "text/javascript">
//show the all page
function allpage()
{
timeintext();
getnowtimeagain();//for change month and year
timeintable();
}
/*
time in text
*/
var nowTime,nowTimeYear,nowTimeMonth,nowTimeDate,nowTimeHours,nowTimeMinutes,nowTimeSeconds;
var nowTimeShowInText;
//set the nowtime in the text
function timeintext()
{
//get nowtime
nowTime = new Date();
nowTimeYear = nowTime.getFullYear(); //now Year
相关文档:
很多人都向在服务器
端调用客户端的函数来操作,也就是在asp中调用java
script脚本中已经定义好的脚本函数。经过研究,发现了一些勉强的方法。
1.
用Response.Write方法写入脚本
比如在你单击按钮后,先操作数据库
,完了后显示已经完成,可以在最后想调用的地方写上
Response.Write("<script type='text/j ......
JavaScript 时间加减:
<HTML>
<BODY>
<script type="text/javascript">
var time = new Date("04/30/2010");
document.write(time);
......
禁止页面刷新的javascript代码
当用户向数据库提交数据后,往往由于点击了F5刷新页面,造成数据的重复提交,很容易造成数据库数据混乱.
如果屏蔽了刷新按钮,二次提交的可能性会小很多!
下面是禁止页面刷新的javascript代码:
document.onkeydown = function()
{
if(ev ......
方案一:
// html & JavaScript
...
<button value="Click me"
onclick="window.navigate('app:command&arg1=1&arg2=2')" />
...
// C++: 响应 的消息函数OnBeforeNavigat2
virtual void OnBeforeNavigate2( LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTar ......