怎樣將單擊鏈接時,將此鏈接的id或name傳入jsp變量?
<a href= "x1.jsp " id= "id1 " name= "name1 "> 進入x1 </a> <br>
<a href= "x2.jsp " id= "id2 " name= "name2 "> 進入x2 </a> <br>
要求單擊某一鏈接,就把此鏈接的內容id或name傳入jsp變量,怎麼做?
<script>
</script>
<%
String str=單擊的鏈接的內容id或name;
%>
------解决方案-------------------- <a href= "x1.jsp?id=id1&name=name1 "> 進入x1 </a> <br>