懂javasript的朋友进来看看,这个问题不能解决
请看:http://search.csdn.net/Expert/topic/2001/2001793.xml?temp=.8257257
这里面mynewpc(水中日月) 提到
你是用的url传值,user.aspx?val=v1&val1=v2&val2=v3,这样不就行了.
我这样写为什么就出现脚本错误
this.Button1.Attributes.Add("onclick","var st=window.showModalDialog('GuestWord.aspx?val='+document.all('txtweb').value&vall='+document.all('txtname').value)");而我把&后面去掉
this.Button1.Attributes.Add("onclick","var st=window.showModalDialog('GuestWord.aspx?val='+document.all('txtweb').value)");却是对的,不知道为什么??
问题点数:50、回复次数:5Top
1 楼Toti(连自己都承认不行,还有什么话好说!)回复于 2005-04-04 13:42:18 得分 0
顺便在问下我要把txtweb,txtname,type传到下个页面,其中type是常量,正确的写怎么样??Top
2 楼seesea125(执著)回复于 2005-04-04 13:55:44 得分 20
his.Button1.Attributes.Add("onclick","var st=window.showModalDialog('GuestWord.aspx?val='+document.all('txtweb').value+'&vall='+document.all('txtname').value+")");Top
3 楼baobei7758(陵少)回复于 2005-04-04 14:04:40 得分 10
this.Button1.Attributes.Add("onclick","var st=window.showModalDialog('GuestWord.aspx?val='+document.all('txtweb').value+'&vall='+document.all('txtname').value)");
注意你在引号里面的参数传递!Top
4 楼syeerzy(快乐永远*先天下之乐而乐*后天下之忧而忧*)回复于 2005-04-04 14:20:21 得分 10
his.Button1.Attributes.Add("onclick","var st=window.showModalDialog('GuestWord.aspx?val='+document.all('txtweb').value+'&vall='+document.all('txtname').value+")");
注意这里:
+'&vall='+Top
5 楼csdn5201(破剑)回复于 2005-04-04 16:45:37 得分 10
你的单引号位置错了,看一下seesea125
his.Button1.Attributes.Add("onclick","var st=window.showModalDialog('GuestWord.aspx?val='+document.all('txtweb').value+'&vall='+document.all('txtname').value+")");
Top




