请教:C#传递数组到JS函数里
展开全部
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
var array;
function alertArray() {
alert('array的内容是:' + array.join(','));
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="btn" runat="server" OnClientClick="alertArray();return false;" Text='alert' />
</form>
</body>
</html>
<head runat="server">
<title></title>
<script>
var array;
function alertArray() {
alert('array的内容是:' + array.join(','));
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="btn" runat="server" OnClientClick="alertArray();return false;" Text='alert' />
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询