<script runat="server">

protected void SubmitBtn_Click(object sender, EventArgs e)
{
firstselect.Attributes.Add("Multiple", "True");
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>AttributeCollection Example</title>
</head>

<body>
<form id="form1" runat="server">
<div>
Make a selection:
<select id="firstselect"
runat="server">
<option>This</option>
<option>That</option>
<option>Other</option>
</select>
<br/><br/>

<input type="submit"
id="submitbtn"
value="modify attribute"
onserverclick="SubmitBtn_Click"
runat="server"/>
</div>
</form>
</body>
</html>

javascript runat server的更多相关文章

  1. 不使用ASP.NET服务器端控件(包括form表单不加runat="server")来触发.cs里的事件(方法),(适用于有代码洁癖者)。

    很多时候,我们使用服务器端控件写出的代码,会给我们生成一些很多我们看不懂的代码(初学者),但是有时候我们并不需要这些代码(业务需求不同),对于生成的一些代码感到多余.所以我就开始想,有没有一种可能:不 ...

  2. 老古董---ASP.NET中aspx页面runat="server"

    自从 mvc3 被广泛的推进生产环境后,这个runat="server" 慢慢被人遗忘了... asp.net 的 webForm 基于控件的 html  渲染过程是否还记得呢?是 ...

  3. 带有runat="server" 的服务器控件通过 ClientID 获取Id

    带有runat="server" 的服务器控件 获取Id <input type="text" id="txtName" runat= ...

  4. 类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内。

    错误的写法:  if (this.GridView1.Rows.Count > 0)         {             string style = @"<style& ...

  5. 后台获取前台runat=server的select的值

    <li> <asp:Label ID="Lpro" runat="server" Text="省份:" CssClass= ...

  6. 当标签上写了runat="server" 后,<%%>就会无效

    当标签上写了runat="server" 后,<%%>就会无效 //这是错误的写法 <input type="hidden" runat=&q ...

  7. 【转载】写runat="server"有什么用

    aspx运行时会被编译,其中没有runat="server"属性的html标签会被直接写入response,有runat="server"属性的html标签会转 ...

  8. 错误提示:类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内 .

    错误提示:类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内 在做导出数据到EXCEL程序中,出现了错误提示:类型“GridView”的控件“Gr ...

  9. asp.net中runat="server"的含义

    aspx运行时会被编译,其中没有runat server属性的html标签会被直接写入response,有runat server属性的html标签会转换成对应的HtmlControl子类加入 到页面 ...

随机推荐

  1. 零基础学python-4.5 标准类型分类

    1.按存储分:原子类型和容器类型 原子类型:仅仅能包括一个对象 容器类型:能够包括多个对象 分类 python类型 原子类型 数值和字符串 容器类型 列表.元组和字典 2.按能否够变化分:可变和不可变 ...

  2. 【LeetCode with Python】 Sort List

    博客域名:http://www.xnerv.wang 原题页面:https://oj.leetcode.com/problems/sort-list/ 题目类型: 难度评价:★ 本文地址:http:/ ...

  3. FFmpeg Basics阅读笔记1:介绍

    Multimedia handling with a fast audio and video encoder 作者:Frantisek Korbel 网址:http://ffmpeg.tv/ FFm ...

  4. CentOS系统时间修改

    1. 实体机器上安装CentOS $date -s '2015-03-03 13:34:00' 2. 虚拟机上安装的CentOS #查看系统时间和硬件时间 date hwclock --show #设 ...

  5. 3932: [CQOI2015]任务查询系统

    3932: [CQOI2015]任务查询系统 Time Limit: 20 Sec  Memory Limit: 512 MBSubmit: 2559  Solved: 819[Submit][Sta ...

  6. EasyPusher实现Android手机屏幕桌面直播,实时推送操作画面,用于手游直播等应用

    本文转自EasyDarwin开源团队成员John的博客:http://blog.csdn.net/jyt0551/article/details/52651194 由于Android 5.0提供了捕获 ...

  7. 在DuiLib中使用MFC类

    比如,想在DuiLib里使用MFC中的CInternetSession 首先,将Project Properties->General->Use of MFC设置为Use MFC in a ...

  8. matlab从fig文件中提取数据

    如果你的fig文件中图像是由多条曲线绘制而成,比如说plot命令生成的,通过以下方式输出横坐标,纵坐标的取值 open('figname.fig'); lh = findall(gca, 'type' ...

  9. python生成图片

    # -*- coding:utf-8 -*- from pylab import * figure(1,figsize=(6,6)) ax = axes([0.1,0.1,0.8,0.8]) frac ...

  10. hadoop学习之旅2

    集群搭建文档1.0版本 1. 集群规划 所有需要用到的软件: 链接:http://pan.baidu.com/s/1jIlAz2Y 密码:kyxl 2.0 系统安装 2.1 主机名配置 vi /etc ...