tôi có một trang cho phép người dùng thay đổi văn bản bên trong div và lưu mã html vào db, tuy nhiên khi tôi hiển thị lại mã html tôi muốn thay đổi div contenteditable thành false. Không có cách nào khác ư???Làm thế nào để thay đổi div contenteditable từ true thành false
<html>
<head>
<title>Generate Poster</title>
<link rel="stylesheet" type="text/css" href="style1.css">
<link href='http://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Ultra' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"; />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="function.js"></script>
</head>
<body>
<h1>H1</h1>
<div class="drag">
<div id="box" style="padding-left: 45px; background: url(2.png);">
<div class="line-division1" style="margin-top: 100px; background-color: #003663;"></div>
<div id="sub-title" contenteditable="true"><span>YOU'RE IN FOR A</span></div>
<div id="title" contenteditable="true">Wild <font color="#90a6b9">Ride</font></div>
<div class="line-division1" style="margin-top: 20px; background-color: #003663;"></div>
<div class="date1" contenteditable="true">THIS JANUARY 21ST 2014</div>
<div class="date1" contenteditable="true">1337 ACCELERATOR, KL</div>
<div class="line-division1" style="width: 150px; height:22px; float: left; background-color: #003663; margin-top: 50px;"></div>
<div class="line-division1" style="width: 150px; height:22px; float: right; background-color: #003663; margin-top: 50px; margin-right: 50px;"></div>
<div class="date1" style="font-size: 80px; width: 500px;" contenteditable="true">JOIN US</div>
</br>
<div class="date1" style="font-size: 38px; margin-top: 20px;">FOR A RIDE OF YOUR LIFE TIME</div>
<img src="waterm.png" style="zoom:30%; margin-top: 280px; margin-left: 2000px;" >
</div>
</div>
mô tả kịch bản của bạn tốt hơn ... bạn luôn có thể thay đổi nó bằng document.getElementById ("diviID"). contenteditable = false; – pinkpanther
khi nào bạn hiển thị lại? mặc dù hình thức gửi .... một số thông tin cần thiết cho câu trả lời đúng ... bạn có thể thay đổi nó trong php cũng ... – pinkpanther
bạn có thể đạt được nó một cách dễ dàng với jquery –