没有样式就是最好的样式

下载地址:

http://www.verycd.com/groups/datum/254656.topic

全套一共有739个PSD源文件,包含有食品餐饮PSD,健康PSD,美丽美容PSD,花纹PSD,音乐PSD,鲜花PSD,夏天PSD,水果PSD,秋 天PSD,家居PSD,婚礼PSD,幻彩PSD,商业PSD,瓷器花纹PSD,科技类PSD,艺术欣赏类PSD,并且赠送数百个PSD和AI设计源文件! 他与以往任何一套设计素材库都不同,以及其强的实用性,征服了设计界,能够极大的提高你的工作效率

Web design stuffs

Jun 3, 2008 Author: admin | Filed under: 还没有分类的日志

http://nicobou.deviantart.com/gallery/
http://designerscouch.deviantart.com/gallery/
http://webgraphix.deviantart.com/gallery/
http://templateartists.deviantart.com/gallery/

动态嵌入 javascript 和 css

Feb 26, 2008 Author: admin | Filed under: css, javascript

动态嵌入 css 代码

var headID = document.getElementsByTagName(”head”)[0];
var cssNode = document.createElement(’link’);
cssNode.type = ‘text/css’;
cssNode.rel = ’stylesheet’;
cssNode.href = ‘FireFox.css’;
cssNode.media = ’screen’;
headID.appendChild(cssNode);

动态嵌入 javascript 代码

var headID = document.getElementsByTagName(”head”)[0];
var newScript = document.createElement(’script’);
newScript.type = ‘text/javascript’;
newScript.src = ‘http://www.somedomain.com/somescript.js’;
headID.appendChild(newScript);

Ajax 就加入 javascript

function ajaxObject(url, callbackFunction) {

var that=this;

this.updating = false;

this.update = function(passData,postMethod) {

if (that.updating==true) { return false; }

that.updating=true;

var AJAX = null;

if (window.XMLHttpRequest) {

AJAX=new XMLHttpRequest();

} else {

AJAX=new ActiveXObject(”Microsoft.XMLHTTP”);

}

if (AJAX==null) {

return false;

} else {

AJAX.onreadystatechange = function() {

if (AJAX.readyState==4) {

that.updating=false;

that.callback(AJAX.responseText,AJAX.status,AJAX.responseXML);

delete AJAX;

}

}

var timestamp = new Date();

if (postMethod==’POST’) {

var uri=urlCall+’?'+timestamp.getTime();

AJAX.open(”POST”, uri, true);

AJAX.setRequestHeader(”Content-type”, “application/x-www-form-urlencoded”);

AJAX.send(passData);

} else {

var uri=urlCall+’?'+passData+’&timestamp=’+(timestamp*1);

AJAX.open(”GET”, uri, true);

AJAX.send(null);

}

return true;

}

}

var urlCall = url;

this.callback = callbackFunction || function () { };

}

function attachScript(responseText, responseStatus) {

// This function is called by the ajaxObject when the server has finished

// sending us the requested script.

if (responseStatus==200) {

eval(responseText);

}

}

// ajaxObject is an object constructor, pass it the server url you want it to call

// and the function name you want it to call when it gets the data back from the server.

// Use the .update() method to actually start the communication with the server.

// The first optional argument for update is the data you want to send to the server.

// ajaxvar.update(’id=1234&greed=good&finish=true’);

// The second optional argument for update is ‘POST’ if you want to send the data

// as a POST instead of the default GET (post can handle larger amounts of data and

// the data doesn’t show up in your server logs).

// ajaxvar.update(’id=1234&greed=good&finish=true’,'POST’);

var getScriptViaAjax=new ajaxObject(’http://mydomain.com/somescript.js’,attachScript);

getScriptViaAjax.update();

var anotherScript = new ajaxObject(’http://mydomain.com/anotherScript.php’,attachScript);

anotherScript.update(’userId=4323′,’POST’);

flickr tag ajax 搜索

<script type=”text/javascript”>

function jsonFlickrFeed(feed){

z=”;

for (x=0; x<feed.items.length; x++) {

tmp=feed.items[x].media.m;

tmp=tmp.replace(/_m\.jpg/g,’_s.jpg’);

z+=’<img src=”‘+tmp+’” mce_src=”‘+tmp+’” alt=”some img” width=”75px” height=”75px” style=”margin: 2px;”>’;

}

document.getElementById(’pics’).style.display=’block’;

document.getElementById(’pics’).innerHTML=z;

}

function searchFlickr() {

var headID = document.getElementsByTagName(”head”)[0];

var newScript = document.createElement(’script’);

tagID = escape(document.getElementById(’tags’).value);

document.getElementById(’tags’).value=”;

newScript.type = ‘text/javascript’;

newScript.src = ‘http://flickr.com/services/feeds/photos_public.gne?tags=’ + tagID + ‘&format=json’;

headID.appendChild(newScript);

document.getElementById(’pics’).style.display=’block’;

document.getElementById(’pics’).innerHTML=”Loading…”;

return false;

}

</script>

<form action = “#” onsubmit=”return searchFlickr();”>

<input type=’text’ size=’40′ id=’tags’>   <input type=’submit’>

</form>

<div style=’border: 1px solid black; width: 100%; display: none;’ id=’pics’></div>

via http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS

jQuery 动画效果插件

Jan 27, 2008 Author: | Filed under: Uncategorized

看到 wordpress 后台的颜色变化效果,找了找…


点击这里打开新窗口浏览此网页

via http://plugins.jquery.com/project/color

关于 css,js 文件后面的数字串

Jan 26, 2008 Author: | Filed under: Uncategorized

因为我极少做项目,所以并没有体会。类似

xxxx/123.css?234235345

xxxx/123.js?234235345

这样的写法大约有两个可能:

1.为了不让浏览器缓存。

2.可能是 url-rewrite 的处理,比如 xxx/123.php?id=234235345

swfupload 文件上传

Jan 24, 2008 Author: | Filed under: Uncategorized

官网报错,打不开,回头看看。

官方网站: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 //是否自动上传,

});