所以我真的不知道怎么问这个……但我正在制作一个网站,您可以在其中单击六个天气图标之一,将您引导到一个页面,该页面允许您输入您的姓名和故事与天气有关,并将其与其他人关于同一类型天气的故事一起发布在最后一页上。我设置了一个表格来保存名称和故事,但是当用户单击其中一个图标时,我不确定如何保存天气。
我的老师说要用javascript做一些事情并制作一个隐藏的表格或其他东西。如果有帮助,请提供指向该网站的链接。http://www.tcnjart.com/christineaustin/whethertheweather/index.html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WhethertheWeather.</title>
<!--<link rel="stylesheet" type="text/css" href="demo/css/screen.css" media="all" />-->
<script src="http://www.adrianpelletier.com/mint/?js" type="text/javascript">
</script>
<script type="text/javascript" src="demo/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="demo/scripts/jquery-ui-1.7.1.custom.min.js">
</script>
<script type="text/javascript" src="demo/scripts/execute.js"></script>
<script>
function connect(){
var moveto= $.(#sel).attr("name");
$(#myweather).value=moveto;
myform.submit;
}
</script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/gradientsky.jpg">
<div id="logo">
WhethertheWeather.
</div>
<div id="question">
Whats your favorite weather?
</div>
<div id="weather">
<ul id="nav-reflection">
<form name="myform" method="post" action="cloudy_name.php">
<li class="button-color-1"><a href="javascript:connect();"id="sel"name"cloudy"
title="My fancy link"><img src="images/cloudybubble.png" width="211" height="180"align="left">
</a></li>
<li class="button-color-1"><a href="sunny_name.php" title="My fancy link"><img src="images/sunnybubble.png" width="211" height="180" align="left"></a></li>
<li class="button-color-2"><a href="snowy_name.php" title="My fancy link"><img src="images/snowbubble.png" width="211" height="180" align="left"></a></li>
<li class="button-color-1"><a href="snowy_name.php" title="My fancy link"><img src="images/rainbubble.png" width="211" height="180" align="left"></a></li>
<li class="button-color-1"><a href="mixy_name.php" title="My fancy link"><img src="images/mixbubble.png" width="211" height="180" align="left"></a></li>
<li class="button-color-1"><a href="windy_name.php" title="My fancy link"<imgsrc="images/windybubble.png" width="211" height="180" align="left"></a></li>
<input type="hidden" name="weather" value="none" id="myweather">
</form>
</ul>
</div>
</body>
</html>