[英]Change Checkbox Checked Value based upon variable passed by href
Using Javascript and HTML Form 使用Javascript和HTML表单
Page 1: Simple Link passing two variables (page1var1=xxxx and page1var=yyyy) separated by an "&" symbol 页面1:简单链接传递两个变量(page1var1 = xxxx和page1var = yyyy),用“&”符号分隔
Page 2: Use Javascript to "split" the two variables either side of the "&" into page2var1 and page2var2 第2页:使用JavaScript将“&”两侧的两个变量“拆分”为page2var1和page2var2
So now page2var1=xxxx
and page2var2=yyyy
(successfully done already) 所以现在
page2var1=xxxx
和page2var2=yyyy
(已经成功完成)
How do I use these variables in page 2 to: 如何在第2页中使用这些变量来:
Something like this: 像这样:
document.GetElementById(Page2var1).checked = true;
document.GetElementById(page2var2).value = 'whatever text'
Nothing google wouldn't help you with. Google会帮您的忙。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.