1
我已經加載了SWFUpload Javascript(確認所有文件加載的位置都是正確的),並添加了加載基本SWFUploader的代碼,但問題是,我沒有看到任何按鈕。我什麼也沒看到。以下代碼看起來是否正確?SWFUpload未初始化
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="<?php echo base_url() ?>assets/fu/swfupload.js"> </script>
<script>
var swfu;
window.onload = function() {
var settings_object = {
upload_url : "<?php echo base_url() ?>index.php/upload",
flash_url : "<?php echo base_url() ?>assets/fu/Flash/swfupload.swf",
file_size_limit : "20 MB",
button_placeholder_id : "element_id",
button_width : 61,
button_height : 22,
button_text : "<b>Click</b> <span class="redText">here</span>",
button_text_style : ".redText { color: #FF0000; }",
button_text_left_padding : 3,
button_text_top_padding : 2,
button_action : SWFUpload.BUTTON_ACTION.SELECT_FILES,
button_disabled : false,
button_cursor : SWFUpload.CURSOR.HAND,
button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,
};
swfu = new SWFUpload(settings_object);
};
</script>
</head>
<body>
<h1>Upload Test</h1>
</body>
</html>
不應該的問題說說SWFUpload的,而不是SWFObject的。我沒有在那裏看到任何SWFObject代碼...?! – pkyeck
對不起。出於某種原因,我一直稱它爲SWFObject。目前我的想法很多。我會改變它。 –
您在瀏覽器的錯誤控制檯中遇到什麼錯誤? –