因为我极少做项目,所以并没有体会。类似
xxxx/123.css?234235345
xxxx/123.js?234235345
这样的写法大约有两个可能:
1.为了不让浏览器缓存。
2.可能是 url-rewrite 的处理,比如 xxx/123.php?id=234235345
官网报错,打不开,回头看看。
官方网站:swfupload.mammon.se/
文档说明:http://swfupload.mammon.se/documentation.php
var swfu;
window.onload = function() {
swfu = new SWFUpload({
upload_script : “/upload”, // 用于处理上传文件保存的controller,action
target : “SWFUploadTarget”, //显示swf的div id
flash_path : “/swf/SWFUpload.swf”, //swf路 径
allowed_filesize : 30720, // 30 MB 上传文件大小的限制
allowed_filetypes : “*.*”, //允许文件类型
allowed_filetypes_description : “All files…”, //允许文件的描述,如*.jpg
browse_link_innerhtml : “Browse”, //显示的文件
upload_link_innerhtml : “Upload queue”,
browse_link_class : “swfuploadbtn browsebtn”,
upload_link_class : “swfuploadbtn uploadbtn”,
flash_loaded_callback : ’swfu.flashLoaded’,
upload_file_queued_callback : “fileQueued”,
upload_file_start_callback : ‘uploadFileStart’,
upload_progress_callback : ‘uploadProgress’,
upload_file_complete_callback : ‘uploadFileComplete’,
upload_file_cancel_callback : ‘uploadFileCancelled’,
upload_queue_complete_callback : ‘uploadQueueComplete’,
upload_error_callback : ‘uploadError’,
upload_cancel_callback : ‘uploadCancel’,
auto_upload : true //是否自动上传,
});
ie6,7 css 打补丁;js;re 类似自定义的简单 $();body 给 id区分栏目。ie6 css 里用 htc 模拟 hover 等 css 效果。
function re(element){
var el = '';
if (document.layers){ el = document[element];}
else if (document.all){ el = document.all[element];}
else if (document.getElementById){ el = document.getElementById(element);}
if (el == undefined || el == null || el == ”){return false;}else{return el;}
}//end function
去掉字符串头尾的空格
$(document).ready(function(){
$("button").click(function () {
var str = " lots of spaces before and after ";
alert("'" + str + "'");
str = jQuery.trim(str);
alert("'" + str + "' - no longer");
});
});
去掉字符串头尾的空格
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
测试 jQuery ajax 功能,只搜索文章标题。
jquery JSON 的 autocomplete 代码例子
http://www.cs.bgu.ac.il/~ygleyzer/files/utils/jqac/jqac_example.html
http://www.dyve.net/jquery/?autocomplete