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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

博客园 - pboy2925

博客搬家 http://jorkin.me [导入][转]一个经典的Access数据库 [导入][转]阿D SQL注入工具常用的一些注入命令 [导入]jQuery插件推荐(最后更新2009年01月18日) [导入][原创]正则分析二级或多级域名的主域名 [导入][原创]级联checkbox,自用权限管理模块,需jQuery [导入][转]跨越域的Cookie [导入]ASP常用函数:RadioScript() [导入][转]读取汉字点阵数据 [导入]可爱的小动物们 [导入]值得收藏经典民间偏方 [导入]如何学习英语(英语学习中最重要的五点) [导入]Oracle常用函数:IDCARD15TO18() 身份证15位转18位函数 [导入][转]地产忽悠大全 [导入]scrollLeft scrollTop clientWidth clientHeight 各浏览器修正 [导入][转]js + .Net 图片切割系统 [导入]试用了一下Dreamweaver CS4 [导入]中文 Windows 95 GBK 代码集字符定义表 [导入]千万千万不要买宏图三胞的东西
[导入]Select的OnChange()事件
pboy2925 · 2009-01-03 · via 博客园 - pboy2925

我们用Select的onchange事件时,常会遇到这样一个问题,那就是连续选相同一项时,不触发onchange事件.select的onchange事件就是这样子的.你得有Change(改变),才能触发该事件....

掌握了它的特性后,相应的解决办法也很简单.

<select onchange="txt.value+=this.options[this.options.selectedIndex].value;this.options[0].selected=true;">
<option value="">请选择</option>
<option value="1">Item 1</option>
<option value="2">Item 2</option>
<option value="3">Item 3</option>
</select>
<textarea id="txt"></textarea>

<form><input id="FileUpload" type="file" style="width:448px; height: 22px;" onchange="FileUpload_onselect()" >
<input name="TbxName" id="TbxName">
<input name="Tbx_FileName" id="Tbx_FileName">
</form>
<script type="text/javascript" language="javascript">   
function FileUpload_onselect()
{
  var path;
  path = document.forms[0].FileUpload.value; //C:\Documents and Settings\hud\桌面\AddFile.jpg
  var aa;
  aa = path.split('.');
  document.all('TbxName').value = aa[aa.length - 1]; //jpg 结果
  var name;
  name = path.split('\\');
  var bb = name[name.length - 1];
  document.all('Tbx_FileName').value = bb.substr(0, bb.indexOf('.')); //AddFile 结果
}
</script>

文章来源:http://Jorkin.Reallydo.Com/default.asp?id=564