CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
IBM Rational 系统开发最佳实践工具包 WebSphere MQ 最佳实践 TOP 15
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  JavaScript

DOCUMENT的问题

楼主sungoco2()2006-03-19 12:48:04 在 Web 开发 / JavaScript 提问

<input   type="button"   value="修改"   class="EditInput"   onclick="document.location.href='SystemSubjectCodeEdit.asp?id=<%=id%>&subjectcode=document.getElementById('subjectcode').value&subjectname=document.getElementById('subjectname').value'">&nbsp;&nbsp;  
   
  错在哪里?? 问题点数:20、回复次数:5Top

1 楼KimSoft(革命的小酒天天醉-http://blog.csdn.net/kimsoft/)回复于 2006-03-19 13:19:29 得分 2

document.location.href  
   
  =>  
   
  window.location.href  
  or  
  location.hrefTop

2 楼sungoco2()回复于 2006-03-19 14:01:22 得分 0

不是呀,在加上document.getElementById('subjectcode').value之前都没有问题,加上之后点了按纽就没反映了Top

3 楼sungoco2()回复于 2006-03-19 14:04:04 得分 0

我想的是把   <input     type="text"   id="subjectcode">的值带到systemsubjectcodeedit.asp里,在这个页面里用request可以获取,Top

4 楼hbhbhbhbhb1021(天外水火(我要多努力))回复于 2006-03-19 17:38:58 得分 13

错在字符串和值的关系,多注意一下document.getElementById('subjectcode').value这个是值,不是字符串,要写在单引号外面。  
  另外=<%=id%>这里面也有可能出错,服务器端语言到客户端之后按你的程序,ID里面如果有单引号或双引号JS都会编译不过。  
   
  "document.location.href='SystemSubjectCodeEdit.asp?id=<%=id%>&subjectcode='+document.getElementById('subjectcode').value+'&subjectname='+document.getElementById('subjectname').value">&nbsp;&nbsp;Top

5 楼xxuu503(中国没有prison break只是因为the company不让拍)回复于 2006-03-20 09:34:40 得分 5

onclick="document.location.href='SystemSubjectCodeEdit.asp?id=<%=id%>&subjectcode='+document.getElementById('subjectcode').value+'&subjectname='+document.getElementById('subjectname').value">&Top

相关问题

  • single document
  • 关于document
  • document的问题!
  • document的使用?
  • document问题
  • Where is the document data stored when and MDI application opens a document?????????????????????????????????????/
  • for(i in document)的疑问
  • 求Java Excel API document
  • Document的getElementById问题
  • 关于document/view 的问题

关键词

  • document
  • asp
  • subjectcode
  • subjectname
  • systemsubjectcodeedit
  • getelementbyid
  • location

得分解答快速导航

  • 帖主:sungoco2
  • KimSoft
  • hbhbhbhbhb1021
  • xxuu503

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo