更新 0
收到此错误消息:未捕获的 ReferenceError:$ 未定义
更新 0
更新 1 个最新源
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Reservations</title>
<link rel="stylesheet" href="/static/css/main.css">
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<center><h1>Reservations</h1></center>
<div class="wrapper">
<p> You can start over at the beginning <a href="/">here.</a> </p>
<big>Reserve some courts online </big> <br />
<script type="text/javascript" language="JavaScript">
$( document ).keypress(function() {
$("#timeStamp span").text("Timestamp is no-longer correct");
});
</script>
<form action="" method="post" >
<input type="hidden" name="ID" value="Rogers"></input>
<input type="hidden" name="weekday" value="Tuesday"></input>
<input type="hidden" name="nowweekday" value="1"></input>
<input type="hidden" name="month" value="September"></input>
<input type="hidden" name="nowmonth" value="9"></input>
<input type="hidden" name="day" value="18"></input>
<input type="hidden" name="year" value="2012"></input>
<input type="hidden" name="startTime" value="[15, 0]"></input>
<input type="hidden" name="endTime" value="[20L, 0L]"></input>
<input type="hidden" name="court" value="court1"></input>
<input type="hidden" name="court" value="court2"></input>
<h1>Tuesday, September 18, 2012 at Rogers Neighborhood Club</h1>
<div class="timeStamp" ><h1 id="timeStamp">15:07:24.657430<span></span></h1></div> <br />
更新 1 个最新源
我在页面加载时创建的页面上有一个时间戳。
我想更改时间戳的相邻文本标签,以表明keyDown
当window
.
可以用javascript轻松完成吗?
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Reservations</title>
<link rel="stylesheet" href="/static/css/main.css">
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<center><h1>Reservations</h1></center>
<div class="wrapper">
<p> You can start over at the beginning <a href="/">here.</a> </p>
<big>Reserve some courts online </big> <br />
<script type="text/javascript" language="JavaScript">
$("*").keypress(function() {
$("#timeStamp").text("Modified");
});
</script>
<form action="" method="post" >
<input type="hidden" name="ID" value="Rogers"></input>
<input type="hidden" name="weekday" value="Tuesday"></input>
<input type="hidden" name="nowweekday" value="1"></input>
<input type="hidden" name="month" value="September"></input>
<input type="hidden" name="nowmonth" value="9"></input>
<input type="hidden" name="day" value="18"></input>
<input type="hidden" name="year" value="2012"></input>
<input type="hidden" name="startTime" value="[14, 30]"></input>
<input type="hidden" name="endTime" value="[20L, 0L]"></input>
<input type="hidden" name="court" value="court1"></input>
<input type="hidden" name="court" value="court2"></input>
<h1>Tuesday, September 18, 2012 at Rogers Neighborhood Club</h1>
<div class="timeStamp" id="timeStamp"><h1>text14:49:30.274646</h1></div> <br />