关于如何动态地在同一页面实现两个互传


所属类别:Asp

文章作者:佚名

特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!


关于如何动态地在同一页面实现两个互传(s1 <==> s2)(jaklin )hello! 先祝大家中秋节快乐!我们常常会碰到这样一个问题: 如何将在同一页面上的一个或的值传到另一个或中 ?这是一个很烦人的问题。可是有时候你偏偏会遇到。 那什么办呢?下面是我“烟酒”了一个上午, 现贴上来让大家共享。 用的方法是很笨也挺麻烦。不过总是有点成就感的。呵呵!大家看看, 指点指点.....<%@ Language=VBScript %>111112222233333->> <<- <%str="function do_select() {" & vbCrlf & _"if (document.form1.select1.options.length > 0) {"&vbCrlf&_"var j=0;"&vbCrlf&_"for(var i=0;i 0) {"&vbCrlf&_"document.form1.sel2.options[document.form1.sel2.options.length] = new Option(" &_"document.form1.select1.options[document.form1.select1.selectedIndex].value,"& _"document.form1.select1.options[document.form1.select1.selectedIndex].value);"& vbCrlfResponse.Write ""Response.Write ""str=str&vbCrlf&"document.form1.select1.options[document.form1.select1.selectedIndex]=null;"&vbCrlf & _"if (document.form1.select1.options.length > 1) {"&vbCrlf'&_str=str&vbCrlf & "}" & vbCrlf & "}" & vbCrlf& "}" & vbCrlf& "}" & vbCrlfResponse.Write "" & vbCrlfResponse.Write str & vbCrlf & ""& vbCrlf%><%str=""str="function do_select2() {" & vbCrlf & _"if (document.form1.sel2.options.length > 0) {"&vbCrlf&_"var j=0;"&vbCrlf&_"for(var i=0;i 0) {"&vbCrlf&_"document.form1.select1.options[document.form1.select1.options.length] = new Option(" &_"document.form1.sel2.options[document.form1.sel2.selectedIndex].value,"& _"document.form1.sel2.options[document.form1.sel2.selectedIndex].value);"& vbCrlfstr=str&"document.form1.sel2.options[document.form1.sel2.selectedIndex] =null;" & vbCrlf &"}"& vbCrlf &"}"& vbCrlf &"}"Response.Write "" & vbCrlfResponse.Write str & vbCrlf & ""& vbCrlf%>很笨吧, 哈哈!若那位大虾有更好的方法, 可别忘了给我寄上一份哦。E_Mail: fz_chenjl@163.net 关闭本页

相关信息

· [译]Visual Basic 2005在语言上的增强(八)属性访问器的可访问性和自定义事件访问器

· 版本控制工具横向比较

· 解除危险 全面封杀网页病毒

· Linux下IGMP以及多播路由分析(转载)








....

119880 61216