如何在onchange事件后某个文本框得到焦点并传值?
test.asp里面<scriptlanguage="javascript">functionfocus123(){document.getElementById("st...
test.asp里面
<script language="javascript">
function focus123()
{
document.getElementById("style").focus();
}
</script>
<select onChange="focus123()";window.location.href=this.value">
<option value="test.asp?brand=华美">华美</option>
<option value="test.asp?brand=阿哆诺斯">阿哆诺斯</option>
</select>
<input type="text" name="style" id="style" />
<%response.write(request("brand"))%>
style得到焦点了,但为什么在window.location.href后request("brand")传不了值? 展开
<script language="javascript">
function focus123()
{
document.getElementById("style").focus();
}
</script>
<select onChange="focus123()";window.location.href=this.value">
<option value="test.asp?brand=华美">华美</option>
<option value="test.asp?brand=阿哆诺斯">阿哆诺斯</option>
</select>
<input type="text" name="style" id="style" />
<%response.write(request("brand"))%>
style得到焦点了,但为什么在window.location.href后request("brand")传不了值? 展开
展开全部
你的意思是不是 onChange 后把 ‘华美’或‘阿哆诺斯’传给style 这个文本框? 然后提交到其他地方去?
<script language="javascript">
function focus123(v)
{
document.getElementById("style").value=v;
document.getElementById("style").focus();
}
</script>
<select onChange="focus123(this.value)">
<option value="华美">华美</option>
<option value="阿哆诺斯">阿哆诺斯</option>
</select>
<script language="javascript">
function focus123(v)
{
document.getElementById("style").value=v;
document.getElementById("style").focus();
}
</script>
<select onChange="focus123(this.value)">
<option value="华美">华美</option>
<option value="阿哆诺斯">阿哆诺斯</option>
</select>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询