惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - ★金★

导出EXCEL table变宽格式 IE11兼容性设定 C#获取多个相同name值 DIV左右行 Jquery绑定Select下拉菜单 SQL中多项合并时请加ISNULL Repeater中绑定下拉菜单的2种方法 WebForm设置URL路由后要照顾好之前的连接 Repeater中获取HTML select 值 NPOI生成Excel 博文阅读密码验证 - 博客园 Firefox中不支持parentElement用parentNode取代 jquery给span赋值的时候出现firefox不兼容 jquery表单验证增加确认及可选不需要验证的方法 javascript可用数组取代case格式化字符 display和visibility的区别 SQL中Replace替换引号 javascript动态添加删除行后行内计算及取值
取代RadioButtonList及RadioButton方法
★金★ · 2011-03-02 · via 博客园 - ★金★

此HTML标签<input id="Radio1" type="radio"/>可完全取代以上2个服务器控件。

RadioButtonList及RadioButton依赖于form窗体,产生很多垃圾代码,有时候只是用来显示此方法可取代。

aspx:

  <input type="radio" name="radio" id="test1" value="1" disabled="disabled" runat="server"/>

  <label for="test1">同意</label>

  <input type="radio" name="radio" id="test2" value="2" disabled="disabled" runat="server"/>

  <label for="test2">不同意</label>

cs:

if (strismk == "1") this.test1.Checked = true;

if (strismk == "2") this.test2.Checked = true;

如此可产生干净的页面代码. 

补充:如果项目很多的时候,name="radio"一定要改名,name="radio1",name="radio2",虽然页面代码里已经选上,可页面上看不到选上的迹象。

其他浏览器没有什么问题,发现Firefox中不能选中,一定要有name值才可以选中。

除了开放调试程序外,Firefox真的是一无是出,启动速度超慢,很多东西不兼容。