大佬教程收集整理的这篇文章主要介绍了jquery – 获取输入类型文件的值,并提醒是否为空,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我的jquery代码,但我不知道如何获得价值
$('.upload').live("click",function() { var imgVal = $('#uploadImage').val(); if(imgVal=='') { alert("empty input file"); } return false; }); <input type="file" name="image" id="uploadImage" size="30" /> <input type="submit" name="upload" class="send_upload" value="upload" />
<script type="text/javascript"> $(document).ready(function() { $('#upload').bind("click",function() { var imgVal = $('#uploadImage').val(); if(imgVal=='') { alert("empty input file"); } return false; }); }); </script> <input type="file" name="image" id="uploadImage" size="30" /> <input type="submit" name="upload" id="upload" class="send_upload" value="upload" />
以上是大佬教程为你收集整理的jquery – 获取输入类型文件的值,并提醒是否为空全部内容,希望文章能够帮你解决jquery – 获取输入类型文件的值,并提醒是否为空所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。