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

推荐订阅源

博客园 - 三生石上(FineUI控件)
SecWiki News
SecWiki News
P
Proofpoint News Feed
P
Palo Alto Networks Blog
L
LINUX DO - 热门话题
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Spread Privacy
Spread Privacy
A
Arctic Wolf
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园_首页
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
DataBreaches.Net
量子位
K
Kaspersky official blog
I
InfoQ
W
WeLiveSecurity
Engineering at Meta
Engineering at Meta
Scott Helme
Scott Helme
U
Unit 42
Cyberwarzone
Cyberwarzone
L
Lohrmann on Cybersecurity
Cisco Talos Blog
Cisco Talos Blog
T
Troy Hunt's Blog
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
Jina AI
Jina AI
Recent Announcements
Recent Announcements
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
Cybersecurity and Infrastructure Security Agency CISA
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
Security Latest
Security Latest
B
Blog RSS Feed
Project Zero
Project Zero
C
Cisco Blogs
S
Securelist
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
N
Netflix TechBlog - Medium
T
Tor Project blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs

博客园 - ★金★

导出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真的是一无是出,启动速度超慢,很多东西不兼容。