javascript onclick事件不反应问题,希望各位帮帮忙

LOVEPANMEI 2011-03-16 10:50:45
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>Education Experience page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" language="javascript" src="<%=basePath%>js/jquery.js"></script>
<style>
body{
background:#cee3ed url(picture/mainBG.jpg) top repeat-x fixed;
}
</style>
<script type="text/javascript">
var education_size=1;

function addDiv(timeone,timeonespace,blank,timetwo,timetwospace,school,schoolspace,institude,institudespace,major,majorspace,degrees,degreesspace){
alert(0);
if(education_size>0) {
if(create(timeone,timeonespace,blank,timetwo,timetwospace,school,schoolspace,institude,institudespace,major,majorspace,degrees,degreesspace)){
education_size=education_size+1;
}
}
}

function create(timeone,timeonespace,blank,timetwo,timetwospace,school,schoolspace,institude,institudespace,major,majorspace,degrees,degreesspace){
var aElement=document.createElement("input");
aElement.type="text";
aElement.Id=timeone;
aElemnt.id=timeone;
var bElement=document.createTextNode("至");
var cElement=document.createElement("input");
cElement.type="text";
cElement.Id=timetwo;
cElemnt.id=timetwo;
var dElement=document.createElement("br");

document.getElementsById(timetwospare).appendChild(dElement);
document.getElementsById(timeonespare).appendChild(aElement);
document.getElementsById(blank).appendChild(bElement);
document.getElementsById(timetwospare).appendChild(cElement);

var eElement=document.createElement("p");
var fElement=document.createElement("input");
fElement.type="text";
fElement.Id=school;
fElement.id=school;
var gElement=document.createElement("/p");
document.getElementsById(schoolspare).appendChild(eElement);
document.getElementsById(schoolspare).appendChild(fElement);
document.getElementsById(schoolspare).appendChild(gElement);

var hElement=document.createElement("p");
var iElement=document.createElement("input");
iElement.type="text";
iElement.Id=institude;
iElement.id=institude;
var jElement=document.createElement("/p");
document.getElementsById(institudespare).appendChild(hElement);
document.getElementsById(institudespare).appendChild(iElement);
document.getElementsById(institudespare).appendChild(jElement);

var kElement=document.createElement("p");
var lElement=document.createElement("input");
lElement.type="text";
lElement.Id=major;
lElement.id=major;
var mElement=document.createElement("/p");
document.getElementsById(majorspare).appendChild(kElement);
document.getElementsById(majorspare).appendChild(lElement);
document.getElementsById(majorspare).appendChild(mElement);

var nElement=document.createElement("br");
var oElement=document.createElement("input");
oElement.type="radio";
oElement.Id=degrees;
oElement.id=degrees1;
var pElement=document.createElement("input");
pElement.type="radio";
pElement.name=degrees;
pElement.id=degrees2;
var qElement=document.createElement("input");
qElement.type="radio";
qElement.name=degrees;
qElement.id=degrees3;
var rElement=document.createElement("input");
rElement.type="radio";
rElement.name=degrees;
rElement.id=degrees4;
document.getElementsById(degreesspare).appendChild(nElement);
document.getElementsById(degreesspare).appendChild(oElement);
document.getElementsById(degreesspare).appendChild(pElement);
document.getElementsById(degreesspare).appendChild(qElement);
document.getElementsById(degreesspare).appendChild(rElement);

return true;
}

function deleteDiv(){
alert('0');
}
</script>
</head>

<body>
<fieldset style="width: 90%;">
<legend>教育经历</legend>
<form action="dataInput/PersonInfo!saveExperience.action" method=post>
<table align="center" cellspacing="1" cellpadding="0" border="1" width="90%">
<tbody>
<TR>
<TD class=col_name vAlign=top
width="21%" align="right">时         间</TD>
<TD vAlign=top width="79%" align="left"><input name="timeone"><span id="timeonespace"></span>至<span id="_blank"></span><input name="timetwo"><span style="color: rgb(102, 102, 102);">  例如1999年3月填写为199903</span> <span id="timetwospace"></span></TD></TR>
<TR>
<TD class=col_name vAlign=top
width="21%" align="right">学         校</TD>
<TD vAlign=top>
<P style="FLOAT: left"><input name="school"></P><span id="schoolspace"></span></TD></TR>
<TR>
<TD class=col_name vAlign=top
width="21%" align="right">学         院</TD>
<TD vAlign=top width="79%" align="left">
<P style="FLOAT: left"><input name="institute"></P><span id="institudespace"></span></TD></TR>
<TR>
<TD class=col_name vAlign=top
width="21%" align="right">专         业</TD>
<TD vAlign=top colSpan=2 width="79%" align="left"><input name="major"> <span id="majorspace"></span></TD></TR>
<TR>
<TD class=col_name vAlign=top
width="21%" align="right">学         历</TD>
<TD vAlign=top colSpan=2 width="79%" align="left">
<s:iterator value="positionList">
<s:property value="pname"/><input type="radio" name="degrees" value="<s:property value='pname'/>">  
</s:iterator><span id="degreesspace"></span></TD></TR>
<tr>
<div align="center">
<input type="button" name="add" value="继续添加" onclick="addDiv('timeone','timeonespace','_blank','timetwo','timetwospace','school','schoolspace','institude','institudespace','major','majorspace','degrees','degreesspace')">
<input type="button" name="button" value="取消添加" onclick="deleteDiv()">
</div>
</tr>
<tr bgcolor="#f7f7f7">
<td colspan="2" align="center">
<input type="button" value="保存/下一步" alt="提交"> 
<input type="reset" value="重置页面内容"/>
</td>
</tr>
</tbody>
</table>
</form>
</fieldset>

</body>
</html>
这是我的页面程序,照理说点击添加按钮之后应该会有事件反应,可是我这里一点反应都没有,不知道问题在哪里,希望哪位能帮帮忙,谢谢了!
...全文
55 点赞 收藏 回复
写回复
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复

还没有回复,快来抢沙发~

相关推荐
基于java的企业人事管理系统设计--软件工程课程设计(含源码与论文设计).rar 1 引言 4 1.1 课程设计目标 4 1.2 编程工具(编程环境)介绍 4 1.3 实施时间及主要实施步骤 4 2 需求分析 5 3 系统总体设计 6 4 数据库设计 6 5 主要功能模块的设计与实现 10 5.1 功能模块1详细设计(综合查询员工信息)..........................................................10 5.1.1 详细设计.......................................................................................................10 5.1.2 算法流程........................................................................................................15 5.1.3 界面设计及测试结果.....................................................................................15 6 调试分析 15 7 用户手册 16 8 测试结果 17 8.1 员工信息的添加...................................................................................................17 8.2 员工信息的修改...................................................................................................17 8.3 员工信息的删除...................................................................................................18 8.4 员工信息的综合查询...........................................................................................18 8.5 员工信息按性别统计的结果................................................................................19 8.6 员工信息按状态统计的结果...............................................................................19 8.7 员工信息按职称统计的结果................................................................................20 9 结论 20 10 参考文献 20
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2011-03-16 10:50
社区公告
暂无公告