Quên mật khẩu?

Ẩn quảng cáo

 

 code resize ảnh của vbb

Go down 
Tác giảThông điệp
admin
[—»Sói™~]-[Ðại Ma Ðầu]
[—»Sói™~]-[Ðại Ma Ðầu]
admin


Giới tính Giới tính : Nam Virgo
Chinese zodiac Chinese zodiac : Horse
Bài viết Bài viết : 1042
Xu Xu : 158
Thanked Thanked : 650
Sinh Nhật Sinh Nhật : 20/09/1990
Tham Gia Tham Gia : 15/07/2011
Tuổi Tuổi : 34
Yahoo Yahoo : Hà Nội
Nghề Nghiệp Nghề Nghiệp : Giáo Sư
Status Status : hgfggggggggggggg

Character sheet
Tài Sản:

code resize ảnh của vbb Empty
Bài gửiTiêu đề: code resize ảnh của vbb   code resize ảnh của vbb EmptySat Aug 27, 2011 9:11 pm

Code:
[color=#000000][font='Times New Roman'][font='Segoe UI']window.onload = function resizeImagesForumotion()
{
if (document.images.length > 0)
{

var maxWidth =768;
var imgHeight;
var imgWidth;
for (var i = 0; i < document.images.length; i++)
{
imgWidth = document.images[i].width;
imgHeight = document.images[i].height;

if (document.images[i].width > maxWidth &&
document.images[i].src !=
"http://i81.servimg.com/u/f81/14/01/69/16/banner14.jpg") {
image = new Image();
image = document.images[i];

newImage = image.cloneNode( true ) ;

newImage.origHeight = image.height;
newImage.origWidth = image.width;


newImage.width = maxWidth ;

imgHeight = imgHeight / (imgWidth/ maxWidth );
newImage.height = imgHeight;

newImage.style.cursor = 'pointer';


if( image.outerHTML )
{

newImage.onclick = "var altHeight;
var altWidth; altHeight = this.height ; altWidth = this.width;
this.width = this.origWidth; this.height = this.origHeight;
this.origWidth = altWidth; this.origHeight = altHeight; ";
} else {
newImage.onclick = function () {
var altHeight;
var altWidth;

altHeight = this.height ;
altWidth = this.width;

this.width = this.origWidth;
this.height = this.origHeight;

this.origWidth = altWidth;
this.origHeight = altHeight;
};
}


if( parentNode = image.parentNode )
{

textMessage = document.createTextNode(' Hình ảnh tại
[url=http://vboy.4rumer.net/]http://vboy.4rumer.net[/url] đã được thu nhỏ, click vào để xem với kích thước
thật');

elem = document.createElement("td");
elem.setAttribute( "align", "center");
elem.style.backgroundColor = '#FFFFCC';
elem.style.color = '#000';
elem.style.fontSize = '10pt';

elem.appendChild( textMessage );
elem.appendChild( document.createElement("br"));
elem.appendChild( newImage );


tableRow = document.createElement("tr");
tableRow.appendChild(elem);

TableElem = document.createElement("table");
TableElem.setAttribute( "border", "0");
TableElem.appendChild( tableRow );

frag = document.createElement("div");
frag.appendChild( TableElem );

if( image.outerHTML )
{
image.outerHTML = frag.innerHTML;
} else {
parentNode.replaceChild( TableElem, image );
}
}
} }
}
} [/font][/font][/color]
cho vào view topic body
Về Đầu Trang Go down
https://itvui.123.st
 
code resize ảnh của vbb
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» Khung code tự resize
» Resize chữ kí
» [Code] Icon trước và sau tên nick chỉ với 1 đoạn code
» code box con
» code Nội quy khi post bài

Permissions in this forum:Bạn không có quyền trả lời bài viết
Kênh thông tin giải trí dành cho teen việt :: *`+`* Mã Nguồn *`+`* :: Thủ Thuật Forumotion :: Code-
Chuyển đến