Thứ 7, 27.04.2024, 11:37 PM
Xin chào Guest | Nhóm "Guests" | Thông tin cá nhân | Log out | RSS
Menu
Đăng nhập
Mini chat
200
Tìm kiếm
Thăm dò ý kiến
Vì sao bạn biết đến Ucozer Community?
Total of answers: 23
Tìm kiếm
Để hiển thị tốt bạn nên:
•Chọn độ phân giải 1024x768
•Dùng trình duyệt Firefox

Thống kê
 


UNME - Bài viết mới
Anh em xem giúp mình xem cái web của mình nó bị lỗi gì với!!
Làm thế nào để tạo trang web bằng ucoz???
Giao lưu cộng đồng uCoz Việt Nam
Chào Tất Cả A E uCoz
Design Website by uCoz
The program to display any cheat pages
The program to display any cheat pages
Không Đăng Được Video và audio lên forum được
giup minh mot chut!!!!!
cách tao thanh kinh nghiệm ??????

UNME - Hot
Nội quy Forum [Nên xem]
Giao lưu cộng đồng uCoz Việt Nam
TỔNG HỢP CODE HIỆU ỨNG WEB
Bạn đã đến với Ucoz như thế nào?
Làm thế nào để tạo trang web bằng ucoz???
Mục đích hoạt động của UnMe
Hack--- Phá quán Net
Ucoz update và 1 số tiện ích đính kèm!
Hướng dẫn cách fake IP
Design Website by uCoz


  • Page 1 of 1
  • 1
You n Me » Thủ thuật Ucoz » Code » Tạo nút ẩn/hiện nội dung bài viết bằng Javascript
Tạo nút ẩn/hiện nội dung bài viết bằng Javascript
Bach-Niem21.07.2009, 10:01 AM



Xu: 36


Phần thưởng: 5
Uy tín: 0
Status: Offline
Code
<script language="javascript">
function _CFAQ()
{
  this.lastOpened = '';
  return this;
}
_CFAQ.prototype.IsDisplaySupported = function()
{
  if( window.opera && !document.childNodes ) return false;
  if( document.getElementById || document.all ) return true;
  return false;
}
_CFAQ.prototype.getQueryVar = function(varName)
{
  var q = window.location.search.substring(1);
  var v = q.split('&');
  for( var i=0; i < v.length; i++ )
  {
  var p = v[i].split('=');
  if( p[0] == varName ) return p[1];
  }
  return null;
}
_CFAQ.prototype.getObj = function(obj)
{
  return ( document.getElementById ? document.getElementById(obj) : ( document.all ? document.all[obj] : null ) );
}
_CFAQ.prototype.displayObj = function(obj, status)
{
  var x = this.getObj(obj);
  if( x && x.style ) x.style.display = status;
}
_CFAQ.prototype.display = function(faq_id, isLink)
{
  if( this.IsDisplaySupported() )
  {
  if( !isLink )
  {
  if( this.lastOpened != '' )
  {
  this.displayObj(this.lastOpened, 'none');
  }
  if( this.lastOpened != faq_id )
  {
  this.displayObj(faq_id, '');
  this.lastOpened = faq_id;
  }
  else
  {
  this.lastOpened = '';
  }
  }
  return false;
  }
  return true;
}

var CFAQ = new _CFAQ();

if( !CFAQ.IsDisplaySupported() )
{
  var u_faq = window.location.href;
  u_faq += ( u_faq.indexOf('?') > 0 ? '&' : '?' ) + 'dhtml=no';
  window.location.replace(u_faq);
}
</script><table style="border-width: 0px;" width="100%" border="1"><tbody><tr><td style="border-style: none; border-width: medium;" height="15">
  <p align="center">
  <div onclick="return CFAQ.display('faq_a_0', false);" style="width: 65px; cursor: pointer; height:19px">
<p align="center">
<b><a href="javascript:void(0)" style="text-decoration: none"><input type="button" value="Hiện/Ẩn"></a></b></span></div><div id="faq_a_0" style="display: none;"><table class="bodyline" align="center" border="0" cellpadding="0" cellspacing="1" width="100%"><tbody><tr><td valign="top"><span class="postbody">
  <table style="border-width: 0px;" width="100%" border="1" id="table1"><tr style="" id="objectPreview"><td>
  Nội dung hiển thị</td></tr></tbody></table>

Cái nút nhìn hơi cùi. Mọi người giúp mình phát triển cái nút thay đổi chữ trên đó nha.
Demo: http://free4all.at.ua/index/0-6


 
pishin22.07.2009, 11:09 AM



Xu: 180


Phần thưởng: 5
Uy tín: 1
Status: Offline
Thanks ông nha, cái code hay lắm cool


Pishin - Shares U Dream
"Love and to be love is greatest happiness in life"
 
You n Me » Thủ thuật Ucoz » Code » Tạo nút ẩn/hiện nội dung bài viết bằng Javascript
  • Page 1 of 1
  • 1
Search:

Free website builderuCozCopyright Ucozer Community © 2024 - Design & Develope by UnMe members :)