{var yy=document.getElementById("xx");var x=yy.value;window.open("xinwenxg.asp?id="+x);}</script><body><style>.a{font-size:12px;margin-top:80px;width:500px; height:500px; border:2px solid #0000ff;}.b{border-bottom:2px solid #0000ff; font-size:20px; width:340px;}.c{margin-top:20px;}</style><body><div align="center">新聞數據庫修改<div class="a" ><div><div class="c"><form name="form" action="" method="post"><input type="text" size="40" name="txt" value=""><input type="submit" name="cha" value=" 查詢 "></div><%if request.form("cha")=" 查詢 " thenset conn=server.createobject("ADODB.connection")CreateConn1 conn,2set rs=server.createobject("ADODB.Recordset")sql="select * from xwnr where 標題 like '%"&request.form("txt")&"%'"rs.Open sql,conn,1,1if not rs.eof thendo while not rs.eof%><div class="b"> <%=rs("標題")%> <input type="radio" name="xg" value="<%=rs("ID")%>" id="xx"></div><%rs.movenextloop%><input type="button" name="xg" value="修改" onclick="xiu( );"><%end ifrs.closeconn.closeset rs=nothingset conn=nothingend if%></form>我希望這個網頁中 的ID 值能通過 JAVASCRIPT 連接到另一個網頁中但是每次我修改的時候,他都是修改最上面的那個數據庫中的新聞,求解怎樣才能我選擇哪個就修改的是哪個我想說這個網頁中的那個表單 redio 中的ID才是我將要傳遞的ID 值 但是我 每次傳遞過去的值 都是最頂的那個ID 是不是我寫的有問題 ,我可能寫的傳遞又問題 請大神幫幫我萬分感謝!
如下代碼中,求解我該怎樣才能想選擇哪個就修改的是哪個?
開滿天機
2022-05-23 19:15:16