<td><input type='file' name='filename' size='15'></td>怎么判断是否已经选择了文件呢?
解决方案 »
- 很奇怪,我自定义的类,实例化后alert,都弹出[object,Object],为什么Array弹出的是字符串,请问它里面怎么写的?
- jqplot 中文倾斜角度 问题!!
- 【囧】=====图片预览 发不到iis就不行了,直接双击打开可以=====
- 未何不见了
- web开发
- 这段Js火狐不支持。。请各位指教
- 求两个正则表达式,多谢了
- 怎样在firefox中定制鼠标右键
- 我照网上写了一个把小写金额转换成大写的javascript脚本,不过要把100转换成 "壹佰元零拾零元零分",可是我只能转换成"壹佰元零角零分"
- 在线等结果:jquerypost表单返回XMLHttpRequest.status=0
- 为什么为什么为什么?
- 求教win7下的一个bug问题,js不能正常显示
<head>
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$(function () {
$('#a').click(function () {
alert($('input[name=filename]').val());
})
})
</script>
</head>
<body>
<input type='file' name='filename' size='15'>
<input id='a' value='upload' type='button' />
</body>
</html>
参考
<html>
<head>
<meta charset="gb2312" />
<title></title>
</head>
<body>
<input type='file' name='filename' size='15' onchange="alert(this.value)">
</body>
</html>