<asp:Repeater runat="server" ID="rptHotList">
<ItemTemplate>
<li><a href="#" onclick="SetEncodeURL('<%# Eval("Value") %>')">
<%# Eval("Value") %></a></li>
</ItemTemplate>
</asp:Repeater>
function SetEncodeURL(value) {
window.location.href="search.aspx?ky=" + encodeURIComponent(value);
}
ie6下测试要在href="#"加上这个才可以跳到另外一个页面,其它浏览器可行。
window.onload=load();
function load()
{
var tmp = '<%=topicid%>';
}
这样写取不到值。