a页:
<script>
function write(val){
document.all.text1.value=val;}
</script>
<input type=text name='text1'>b页:
<input type=button onclick=opener.write("123")>a页点击后弹出b页
<script>
function write(val){
document.all.text1.value=val;}
</script>
<input type=text name='text1'>b页:
<input type=button onclick=opener.write("123")>a页点击后弹出b页
这里的123我怎么取到阿,我要从列表框选择完后,再通过这个按钮放进前面的text李
<input type=button onclick='getValue()'>
<select name=s><option value=1>1</option><option value=2>3</option></select>
<script>
function getValue(){
opener.write(document.all.s.value);}</script>
说实话,你这20分拿得还挺费事的.呵呵.
<script>
function write(val){
document.all.text1.value=val;}
</script>
<input type=text name='text1'>b页:
<form method=post action="">
<select name="s1">
<OPTION value="a">a</OPTION>
<OPTION value="b">b</OPTION>
</select>
<input type=button onclick=opener.write(this.form.s1.options[this.form.s1.selectedIndex].value)>
</form>a页点击后弹出b页
javascript也可以操作cookie
你可以通过cookie在页面间传递数据
怎么告诉我是空域或没有对象呢
<select name="s1" multiple>
<OPTION value="a">a</OPTION>
<OPTION value="b">b</OPTION>
</select>
<input type=button onclick="chk()" value="aaa">
</form>
<script>
function chk(){
var str=''
var i=document.form1.s1
for(var j=0;j<i.length;j++){
if(i[j].selected)str+=i[j].value+'&'
}
opener.write(str)
}