我有一个问题......我想做一些事情,比如上传文件(图片)......我做那个代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Upload Pic. !</title>
<style type="text/css">
div#mybutton {
overflow: hidden;
position: relative;
width: 50px;
height: 28px;
border: 1px solid green;
font-weight: bold;
background: red;
}
div#mybutton:hover {
background: green;
}
input#myfile {
height: 30px;
cursor: pointer;
position: absolute;
top: 0px;
right: 0px;
font-size: 100px;
z-index: 2;
opacity: 0.0;
filter: alpha(opacity=0);
-ms-filter: "alpha(opacity=0)";
-khtml-opacity: 0.0;
-moz-opacity: 0.0;
}
</style>
</head>
<body>
<form id="test_form" action="User_Finder.php">
<div id="mybutton">
<input type="file" id="myfile" name="upload"/>
Click Me!
</div>
</form>
<script type="text/javascript">
<!--
$(document).ready(function() {
$('#myfile').change(function(evt) {
$('#test_form').submit();
});
});
</script>
</body>
</html>
但它不起作用....我知道它为什么不起作用,你可以通过这张图片看到它:http: //im37.gulfup.com/u0SPB.png ...我在gggogle中寻找这个问题的解决方案很长时间或在stackoverflow中,但我没有找到任何答案...请帮助我...谢谢:)