ASP href链接问题

来源:百度知道 编辑:UC知道 时间:2024/05/11 02:27:24
我做了一个页面,左年是产品的导航,右边是产品的显示..
产品显示的查询语句是select * from produce where sort='防火墙'
我想单击左边导航的微软可以刷新右边产品的内容显示为select * from produce where sort='微软'
请问href代码这里怎么写?
我只有25分谢谢!!

JS问题,

<body>
<script language="JavaScript">
function changeText(str) {
var txt=document.getElementById("mytext");
txt.value="select * from produce where sort='"+str+"'";
}
</script>
<a href="#" onclick="changeText('微软');">微软</a>
<input id="mytext" type="text" size="50" value="">
</body>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

如果想要在标签里显示的话就这样写:

<body>
<script language="JavaScript">
function changeText(str) {
var txt=document.getElementById("mytext");
txt.innerHTML="select * from produce where sort='"+str+"'";
}
</script>
<a href="#" onclick="changeText('微软');">微软</a>
<div id="mytext