JS编辑出错问题,谢谢!
我想在Default3.aspx中添加代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
想添加代码如下:
<input type='hidden' value="<% if toUpdate then %><%= rS1("StationID") %><% end if %>" name="reviewStation">
<input type='text' class="newField" style="align:left; width:245px;" value="" name="revStationShow">
<script> //var obj_station = new autosuggest("revStationShow", stations_array);
var obj_station = new autosuggest("revStationShow", stations_array, null, function(index, control)
{
//alert("You've selected the key: " + control.values[index]);
document.getElementById('reviewStation').value = control.values[index];
}
);
</script>
想添加代码参照http://www.codeproject.com/Articles/20174/Auto-suggest-Control?msg=3075222,谢谢!我自己尝试添加了一下,老是报错,请高手给个正确的,本人菜鸟,再次感谢!