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

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
F
Full Disclosure
A
About on SuperTechFans
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
Know Your Adversary
Know Your Adversary
K
Kaspersky official blog
L
LINUX DO - 热门话题
Recorded Future
Recorded Future
C
Cisco Blogs
M
MIT News - Artificial intelligence
T
Tenable Blog
G
GRAHAM CLULEY
月光博客
月光博客
Recent Announcements
Recent Announcements
V
Visual Studio Blog
IT之家
IT之家
T
The Exploit Database - CXSecurity.com
The GitHub Blog
The GitHub Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
P
Privacy International News Feed
P
Proofpoint News Feed
I
Intezer
博客园 - 叶小钗
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
SecWiki News
SecWiki News
宝玉的分享
宝玉的分享
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
小众软件
小众软件
Hacker News - Newest:
Hacker News - Newest: "LLM"
O
OpenAI News
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic
The Cloudflare Blog
Spread Privacy
Spread Privacy
酷 壳 – CoolShell
酷 壳 – CoolShell
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
B
Blog RSS Feed

博客园 - 冯岩

RSA算法 Android JAVA C#互通 jquery.autocomplete.js 插件的自定义搜索规则 LINQ TO SQL 动态查询 ASPX多服务器控件下使用Jquery.validate.js 接受来自服务器的数据连接时发生超时(30000 毫秒)问题原因及解决方法 防止网页被客户端IE缓存 dottext阅读之系统调度分析 Javascript对日期的操作 C#读取被进程占用的文件 SqlServer 无日志文件附加 windows2003远程桌面退出后系统自动注销的解决方法 JS获取触发事件元素的方法 Marquee首尾相连不间断移动 开始完全显示 c#将数据导入Excel另类方法 windows Server 2008常见问题及解决方法 .NET 特性Attribute[三] .NET 特性Attribute[二] .NET 特性Attribute[一] [安装程序配置服务器失败]解决SQL Server2000安装失败
JS处理选取值
冯岩 · 2008-10-20 · via 博客园 - 冯岩

JS获取单选按扭的值

<label><input type="radio" name="radio" value="1-10 岁">1-10 岁</label>
<label><input type="radio" name="radio" value="11 岁">11 岁</label>
<label><input type="radio" name="radio" value="12-120 岁">12-120 岁</label>
<input type="button" onclick="ok()" value="测试选择值">

JS处理

<script language="javascript" type="text/javascript">
<!--
function ok()
{
  
var temp=document.getElementsByName("radio");
  
for (i=0;i<temp.length;i++){
  
//遍历Radio
    if(temp[i].checked)
      
{
    alert(
"你选择了"+temp[i].value);
          
//获取Radio的值     
      }

  }

}

-->
</script>

JS设置DropdownList  Select的选择值

    <script language="javascript">
        
//JS 设置DropdownList 的选择值
        function select()
        {
            
//根据选择索引设置  以0开始
            var temp = document.getElementById("ddlPackageType");                
            temp.options[
0].selected=true;
            
            
//获取选项文本和值
            alert(temp.options[temp.selectedIndex].text);
            alert(temp.options[temp.selectedIndex].value);
        }            
        
</script>