<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Hàm format&#40;&#41; trong Python</title>
<meta name="description" content="Hàm format&#40;&#41; trong Python - Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;www.nguoicodonvn2008.info&#x002F;vi&#x002F;news&#x002F;savefile&#x002F;kien-thuc-may-tinh&#x002F;ham-format-trong-python-9709.html">
<meta name="author" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :.">
<meta name="copyright" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :. [admin@nguoicodonvn2008.info]">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="generator" content="NukeViet v4.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Hàm format&#40;&#41; trong Python">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;www.nguoicodonvn2008.info&#x002F;vi&#x002F;news&#x002F;savefile&#x002F;kien-thuc-may-tinh&#x002F;ham-format-trong-python-9709.html">
<meta property="og:site_name" content=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.">
<meta property="og:url" content="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/ham-format-trong-python-9709.html">
<link rel="shortcut icon" href="https://www.nguoicodonvn2008.info/favicon.ico">
<link rel="canonical" href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/ham-format-trong-python-9709.html">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/" title="Tin Tức" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/karaoke-dual/" title="Tin Tức - Karaoke Dual" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/nhac-tre/" title="Tin Tức - Nhạc trẻ" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/tru-tinh/" title="Tin Tức - Trữ tình" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/nuoc-ngoai/" title="Tin Tức - Nước ngoài" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/remix/" title="Tin Tức - Remix" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/tam-su-tinh-yeu/" title="Tin Tức - Tâm sự tình yêu" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/tho-suu-tam/" title="Tin Tức - Thơ sưu tầm" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/cuoc-song/" title="Tin Tức - Cuộc sống" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/phan-mem/" title="Tin Tức - Phần mềm" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/kien-thuc-may-tinh/" title="Tin Tức - Kiến thức máy tính" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/hoc-tap/" title="Tin Tức - Học tập" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/tai-lieu/" title="Tin Tức - Tài liệu" type="application/rss+xml">
<link rel="alternate" href="https://www.nguoicodonvn2008.info/vi/news/rss/de-thi/" title="Tin Tức - Đề thi" type="application/rss+xml">
<link rel="preload" as="style" href="https://www.nguoicodonvn2008.info/assets/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://www.nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://www.nguoicodonvn2008.info/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://www.nguoicodonvn2008.info/themes/default/css/style.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://www.nguoicodonvn2008.info/themes/default/css/news.css" type="text/css">
<link rel="preload" as="style" href="https://www.nguoicodonvn2008.info/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/themes/default/js/news.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://www.nguoicodonvn2008.info/themes/default/js/bootstrap.min.js" type="text/javascript">
<link rel="stylesheet" href="https://www.nguoicodonvn2008.info/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="https://www.nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css">
<link rel="stylesheet" href="https://www.nguoicodonvn2008.info/themes/default/css/style.css">
<link rel="stylesheet" href="https://www.nguoicodonvn2008.info/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://www.nguoicodonvn2008.info/themes/default/css/news.css">
<link rel="stylesheet" href="https://www.nguoicodonvn2008.info/themes/default/css/custom.css">
<style type="text/css">
	body{background: #fff;}
</style>
    </head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">.&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.</h2>
		<p class="pull-right"><a title=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;." href="https://www.nguoicodonvn2008.info/">https://www.nguoicodonvn2008.info</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Hàm format&#40;&#41; trong Python</h1>
		<ul class="list-inline">
			<li>Thứ hai - 20/01/2025 09:53</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
		</div>
				<div class="imghome">
			<img alt="Hàm format&#40;&#41; trong Python" src="https://st.quantrimang.com/photos/image/2019/07/31/ham-max-python-200-size-80x80-znd.jpg" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<p style="text-align: justify;"><strong>Hàm Format trong Python là gì?</strong>&nbsp;<strong>Cách dùng format Python&nbsp;</strong>như thế nào? Hãy cùng nhau tìm hiểu nhé!</p>

<p style="text-align: justify;">Python là ngôn ngữ lập trình phổ biến hiện nay vì dễ học, dễ ứng dụng và phát triển. Tất cả nhờ những tính năng tuyệt vời của nó đối với lập trình.</p>

<p style="text-align: justify;">Trong ngôn ngữ Python, chúng ta có một bộ sưu tập phong phú các phương thức và hàm tích hợp sẵn. Các hàm này rất hữu ích, cung cấp một cách dễ dàng và thanh lịch để viết mã, một trong số phương pháp như vậy là format() trong Python. Nó cung cấp chức năng định dạng các giá trị theo cách người dùng muốn bằng việc đề cập đến biểu diễn trong trình chỉ định định dạng.</p>

<p style="text-align: justify;">Hàm định dạng Python rất hữu ích, đồng thời cung cấp một cách thuận tiện để định dạng số. Ví dụ, nó cung cấp một cách thanh lịch để chuyển đổi số nguyên sang định dạng nhị phân, nhằm thiết lập độ chính xác, căn chỉnh và nhiều hơn nữa. Bài viết này sẽ cung cấp thông tin chi tiết, bao gồm khái niệm về tất cả các triển khai hàm format() kèm ví dụ trong lập trình Python.</p>

<p style="text-align: justify;"><strong>Format Python</strong>&nbsp;là gì? Đây là câu hỏi được rất nhiều người học Python quan tâm. Hàm format() là một công cụ mạnh mẽ, cho phép lập trình viên tạo các chuỗi được định dạng bằng cách nhúng biến và giá trị vào placeholder trong chuỗi mẫu. Phương thức này cung cấp một cách linh hoạt và toàn diện để xây dựng cấu trúc đầu ra văn bản cho nhiều ứng dụng khác nhau. Hàm format() chuỗi Python đã được giới thiệu để xử lý định dạng chuỗi phức tạp hiệu quả hơn. Đôi khi, có thể bạn muốn tạo các lệnh in tổng quát trong trường trường đó thay vì viết lệnh in mỗi lần dùng khái niệm định dạng.</p>

<h3 style="text-align: justify;">Cú pháp hàm format() trong Python:</h3>

<pre id="pre0" style="text-align: justify;">
format(value&#91;, format_spec&#93;)</pre>

<h3 style="text-align: justify;">Các tham số của hàm format()</h3>

<p style="text-align: justify;">Hàm format() có 2 tham số:</p>

<ul>
	<li style="text-align: justify;"><code>value</code>: giá trị cần được định dạng.</li>
	<li style="text-align: justify;"><code>format_spec</code>: định dạng bạn muốn cho&nbsp;<em>value.</em></li>
</ul>

<p style="text-align: justify;"><strong>Các bộ định dạng:</strong></p>

<table border="1">
		<tr>
			<td style="text-align: justify;"><strong>Kiểu</strong></td>
			<td style="text-align: justify;"><strong>Mô tả</strong></td>
		</tr>
	<tbody>
		<tr>
			<td style="text-align: justify;">&lt;</td>
			<td style="text-align: justify;">Căn trái kết quả</td>
		</tr>
		<tr>
			<td style="text-align: justify;">^</td>
			<td style="text-align: justify;">Căn giữa kết quả</td>
		</tr>
		<tr>
			<td style="text-align: justify;">&gt;</td>
			<td style="text-align: justify;">Căn phải kết quả</td>
		</tr>
		<tr>
			<td style="text-align: justify;">=</td>
			<td style="text-align: justify;">Đặt dấu dương (+) hoặc âm (-) ở sát lề bên trái</td>
		</tr>
		<tr>
			<td style="text-align: justify;">d</td>
			<td style="text-align: justify;">Định dạng số nguyên</td>
		</tr>
		<tr>
			<td style="text-align: justify;">c</td>
			<td style="text-align: justify;">Ký tự Unicode tương ứng</td>
		</tr>
		<tr>
			<td style="text-align: justify;">b</td>
			<td style="text-align: justify;">Định dạng nhị phân</td>
		</tr>
		<tr>
			<td style="text-align: justify;">o</td>
			<td style="text-align: justify;">Định dạng bát phân</td>
		</tr>
		<tr>
			<td style="text-align: justify;">x</td>
			<td style="text-align: justify;">Định dạng thập lục phân (chữ thường)</td>
		</tr>
		<tr>
			<td style="text-align: justify;">X</td>
			<td style="text-align: justify;">Định dạng thập lục phân (chữ hoa)</td>
		</tr>
		<tr>
			<td style="text-align: justify;">n</td>
			<td style="text-align: justify;">Định dạng số thập phân</td>
		</tr>
		<tr>
			<td style="text-align: justify;">e</td>
			<td style="text-align: justify;">Ký hiệu mũ. (chữ thường e)</td>
		</tr>
		<tr>
			<td style="text-align: justify;">E</td>
			<td style="text-align: justify;">Ký hiệu mũ. (chữ hoa E)</td>
		</tr>
		<tr>
			<td style="text-align: justify;">f</td>
			<td style="text-align: justify;">Định dạng số thực dấu phẩy động (Mặc định: 6)</td>
		</tr>
		<tr>
			<td style="text-align: justify;">F</td>
			<td style="text-align: justify;">Tương tự như &#039;f&#039;, nhưng hiển thị chữ hoa, ví dụ &#039;inf&#039; là &#039;INF&#039; và &#039;nan&#039; là &#039;NAN&#039;</td>
		</tr>
		<tr>
			<td style="text-align: justify;">g</td>
			<td style="text-align: justify;">Định dạng chung. Làm tròn số đến p chữ số có nghĩa. (Mặc định: 6)</td>
		</tr>
		<tr>
			<td style="text-align: justify;">G</td>
			<td style="text-align: justify;">Tương tự như &#039;g&#039;, chuyển sang &#039;E&#039; nếu số quá lớn.</td>
		</tr>
		<tr>
			<td style="text-align: justify;">%</td>
			<td style="text-align: justify;">Tỷ lệ phần trăm.</td>
		</tr>
	</tbody>
</table>

<p style="text-align: justify;"><strong>Trình định dạng có thứ tự như sau:</strong></p>

<pre id="pre1" style="text-align: justify;">
&#91;&#91;fill&#93;align&#93;&#91;sign&#93;&#91;#&#93;&#91;0&#93;&#91;width&#93;&#91;,&#93;&#91;.precision&#93;&#91;type&#93;</pre>

<p style="text-align: justify;">Trong đó:</p>

<ul>
	<li style="text-align: justify;"><em>fill:</em>&nbsp;là bất kỳ ký tự nào</li>
	<li style="text-align: justify;"><em>align:</em>&nbsp;căn chỉnh, &quot;&lt;&quot; | &quot;&gt;&quot; | &quot;=&quot; | &quot;^&quot;</li>
	<li style="text-align: justify;"><em>sign:</em>&nbsp;dấu, &quot;+&quot; | &quot;-&quot; | &quot; &quot;</li>
	<li style="text-align: justify;"><em>width:</em>&nbsp;độ dài chuỗi, là một số nguyên</li>
	<li style="text-align: justify;"><em>precision:</em>&nbsp;độ chính xác, là một số nguyên</li>
	<li style="text-align: justify;"><em>type:</em>&nbsp;kiểu định dạng, &quot;b&quot; | &quot;c&quot; | &quot;d&quot; | &quot;e&quot; | &quot;E&quot; | &quot;f&quot; | &quot;F&quot; | &quot;g&quot; | &quot;G&quot; | &quot;n&quot; | &quot;o&quot; | &quot;s&quot; | &quot;x&quot; | &quot;X&quot; | &quot;%&quot;</li>
</ul>

<h3 style="text-align: justify;">Giá trị trả về từ format()</h3>

<p style="text-align: justify;">Phương thức format() trả về kết quả đã được định dạng của một giá trị cho trước xác định bởi bộ định dạng cụ thể.</p>

<h3 style="text-align: justify;">Ví dụ 1: Định dạng số với format()</h3>

<pre id="pre2" style="text-align: justify;">
# d, f và b là loại định dạng

# số nguyên
print(format(123, &quot;d&quot;))

# số thập phân
# viết bởi Quantrimang.com
print(format(123.4567898, &quot;f&quot;))

# nhị phân
print(format(12, &quot;b&quot;))</pre>

<p style="text-align: justify;">Chạy chương trình, kết quả trả về là:</p>

<pre id="pre3" style="text-align: justify;">
123
123.456790
1100</pre>

<h3 style="text-align: justify;">Ví dụ 2: Định dạng số với căn chỉnh</h3>

<pre id="pre4" style="text-align: justify;">
# số nguyên 
print(format(1234, &quot;*&gt;+7,d&quot;))

# số thập phân
print(format(123.4567, &quot;^-09.3f&quot;))</pre>

<p style="text-align: justify;">Output trả về:</p>

<pre id="pre5" style="text-align: justify;">
*+1,234
0123.4570</pre>

<p style="text-align: justify;">Ở đây, khi định dạng số nguyên 1234, ta chỉ định trình định dạng bao gồm&nbsp;<code>*&lt;+7,d</code>. Tại sao lại như vậy? Chi tiết như sau:</p>

<ul>
	<li style="text-align: justify;"><code>*</code>&nbsp;Ký tự fill, lấp đầy các chỗ trống sau khi định dạng.</li>
	<li style="text-align: justify;"><code>&gt;</code>&nbsp;Tùy chọn căn chỉnh bên phải, nên chuỗi đầu ra nằm ở bên phải.</li>
	<li style="text-align: justify;"><code>+</code>&nbsp;Tùy chọn buộc số output phải có dấu (có dấu nằm bên bên trái).</li>
	<li style="text-align: justify;"><code>7</code>&nbsp;Tùy chọn quy định độ dài của kết quả, buộc số trả về phải có độ dài tối thiểu là 7 ký tự, các khoảng trắng khác sẽ được lấy đầy bằng ký tự fill.</li>
	<li style="text-align: justify;"><code>,</code>&nbsp;Toán tử hàng nghìn, dấu phẩy sẽ được đặt giữa chữ số hàng nghìn với các chữ số còn lại.</li>
	<li style="text-align: justify;"><code>d</code>&nbsp;Tùy chọn chỉ định kết quả trả về là một số nguyên.</li>
</ul>

<p style="text-align: justify;">Khi định dạng số thực dấu phẩy động (floating point number) 123.4567, ta chỉ định trình định dạng bao gồm&nbsp;<code>^-09.3f</code>, chi tiết như sau:</p>

<ul>
	<li style="text-align: justify;"><code>^</code>&nbsp;Tùy chọn căn chỉnh vị trí chính giữa, nên chuỗi đầu ra sẽ nằm ở chính giữa trong không gian quy định.</li>
	<li style="text-align: justify;"><code>-</code>&nbsp;Tùy chọn buộc số output phải hiển thị dấu âm.</li>
	<li style="text-align: justify;"><code>0</code>&nbsp;Ký tự thêm vào các khoảng trống sau khi định dạng.</li>
	<li style="text-align: justify;"><code>9</code>&nbsp;Tùy chọn quy định độ dài của kết quả, buộc số trả về phải có độ dài tối thiểu là 9 ký tự (tính cả dấu thập phân, dấu phẩy và cả dấu âm dương).</li>
	<li style="text-align: justify;"><code>.3</code>&nbsp;Toán tử precision, xác định độ chính xác, làm tròn đến chữ số thứ 3 sau dấu thập phân.</li>
	<li style="text-align: justify;"><code>f</code>&nbsp;Tùy chọn chỉ định kết quả trả về là một số thực dấu phẩy động.</li>
</ul>

<h3 style="text-align: justify;">Ví dụ 3: Sử dụng format() bằng cách ghi đè lên __format__()</h3>

<pre id="pre6" style="text-align: justify;">
# phương thức __format __ () tùy chỉnh
class Person:
    def __format__(self, format):
        if(format == &#039;age&#039;):
            return &#039;23&#039;
        return &#039;None&#039;
print(format(Person(), &quot;age&quot;))</pre>

<p style="text-align: justify;">Chạy chương trình, kết quả trả về là:</p>

<pre id="pre7" style="text-align: justify;">
23</pre>

<p style="text-align: justify;">Ở đây, ta đã ghi đè phương thức&nbsp;<em>__format</em>&nbsp;__() của lớp Person, và phương thức&nbsp;<em>format()</em>&nbsp;bên trong chạy&nbsp;<code>Person().__format__(&quot;age&quot;)</code>&nbsp;để trả về&nbsp;<code>23</code>.</p>

<h3 style="text-align: justify;">Ví dụ 4: Sử dụng format() với list- danh sách</h3>

<p style="text-align: justify;">Cung cấp một danh sách các giá trị float, nhiệm vụ này cắt bớt tất cả giá trị float thành 2 chữ số thập phân. Hãy xem các phương thức khác nhau để làm nhiệm vụ này.</p>

<pre id="pre8" style="text-align: justify;">
# Code Python giảm giá trị float sang 2 chữ số thập phân.

# Khởi tạo danh sách
Input = &#91;100.7689454, 17.232999, 60.98867, 300.83748789&#93;

# Dùng format
Output = &#91;&#039;{:.2f}&#039;.format(elem) for elem in Input&#93;

# In đầu ra
print(Output)
</pre>

<p style="text-align: justify;">Kết quả:</p>

<p style="text-align: justify;"><code>&#91;&#039;100.77&#039;, &#039;17.23&#039;, &#039;60.99&#039;, &#039;300.84&#039;&#93;</code></p>

<p style="text-align: justify;"><strong>Ví dụ 5:&nbsp;</strong>Dùng dictionary để giải nén các giá trị vào những placeholder trong chuỗi cần được định dạng. Về cơ bản, chúng ta dùng ** để giải nén các giá trị này. Phương thức trên có thể hữu ích trong việc thay thế chuỗi, đồng tời chuẩn bị một truy vấn SQL.</p>

<pre id="pre9" style="text-align: justify;">
introduction = &#039;My name is {first_name} {middle_name} {last_name} AKA the {aka}.&#039;
full_name = {
&#039;first_name&#039;: &#039;Tony&#039;,
&#039;middle_name&#039;: &#039;Howard&#039;,
&#039;last_name&#039;: &#039;Stark&#039;,
&#039;aka&#039;: &#039;Iron Man&#039;,
}

# Lưu ý dùng toán tử &quot;**&quot; để giải nén các giá trị.
print(introduction.format(**full_name))</pre>

<p style="text-align: justify;">Kết quả:</p>

<p style="text-align: justify;"><code>My name is Tony Howard Stark AKA the Iron Man.</code></p>

<div style="text-align: justify;">&nbsp;</div>

<h2 style="text-align: justify;">So sánh format() tích hợp và format() chuỗi</h2>

<p style="text-align: justify;">Hàm&nbsp;<code>format()</code>&nbsp;tương tự như phương thức định dạng chuỗi. Về cơ bản, cả hai phương thức đều gọi&nbsp;<code>__format__()</code>&nbsp;của một đối tượng.</p>

<p style="text-align: justify;">Trong khi hàm format() tích hợp là triển khai cấp độ thấp cho định dạng một đối tượng bằng&nbsp;<code>__format__()</code>&nbsp;nội tại, chuỗi format() là triển khai cấp cao hơn có thể thực hiện các hoạt động định dạng phức tạp trên nhiều chuỗi đối tượng.</p>

<p style="text-align: justify;">Như bạn thấy, cách dùng hàm format trong Python không quá khó. Chỉ cần nắm được những kiến thức cơ bản trên, bạn có thể dùng thành thạo lệnh này.</p>

<div style="text-align: justify;">&nbsp;</div>
		</div>
				<div id="author">
						<p>
				<strong>Nguồn tin:</strong>
				Quantrimang.com:
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/ham-format-trong-python-9709.html" title="Hàm format&#40;&#41; trong Python">https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/ham-format-trong-python-9709.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; .&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.
		</div>
		<div id="contact">
			<a href="mailto:admin@nguoicodonvn2008.info">admin@nguoicodonvn2008.info</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://www.nguoicodonvn2008.info/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
		</script>
		<div class="car-top">
  <span><img src="https://www.nguoicodonvn2008.info/themes/default/images/car.png" alt=""></span>
</div>
<script src="https://www.nguoicodonvn2008.info/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=-4,nv_my_abbr="EDT",nv_cookie_prefix="nv4c_e856T",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_recaptcha_ver=2,nv_recaptcha_sitekey="",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://www.nguoicodonvn2008.info/assets/js/language/vi.js"></script>
<script src="https://www.nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js"></script>
<script src="https://www.nguoicodonvn2008.info/assets/js/global.js"></script>
<script src="https://www.nguoicodonvn2008.info/assets/js/site.js"></script>
<script src="https://www.nguoicodonvn2008.info/themes/default/js/news.js"></script>
<script src="https://www.nguoicodonvn2008.info/themes/default/js/main.js"></script>
<script src="https://www.nguoicodonvn2008.info/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "https://www.nguoicodonvn2008.info",
            "logo": "https://www.nguoicodonvn2008.info/uploads/angel.gif"
        }
        </script>
<script src="https://www.nguoicodonvn2008.info/themes/default/js/bootstrap.min.js"></script>
<script type="text/javascript">
var $scrolltop = $('.car-top');
$scrolltop.on('click', function () {
    $('html,body').animate({
        scrollTop: 0
    }, 800);
    $(this).addClass("car-run");
    setTimeout(function(){ $scrolltop.removeClass('car-run');}, 1000);
    return false;
});
$(window).on('scroll', function ()
{ 
    if($(window).scrollTop() >= 200)
    {
        $scrolltop.addClass("show");
        $scrolltop.addClass("car-down");
    }
    else
    {
       $scrolltop.removeClass("show");
       setTimeout(function(){ $scrolltop.removeClass('car-down');}, 300);
    }
});
</script>
</body>
</html>