Cấu hình biến cho hàm nạp HTML

Là biến tạo biến động từ file html

Cú pháp: <input_txt>Tên_hiển_thị/->/Nội_dung</input_txt>
Ví dụ ta tạo trang Liên hệ có các tham số cần thay đổi như: điện thoại, địa chỉ

Cách làm:

1. Tạo trang html:
<div>
  CÔNG TY NHẬT THÀNH <br>
  Địa chỉ <input_txt>Địa chỉ/->/Việt Nam</input_txt> <br>
  Địện thoại <input_txt>Điện thoại/->/0935999617</input_txt> <br>
</div>
 
2. Cấu hình tạo trang thay đổi
/ManagerFile/Readhtml_para.aspx?file=/html/test.htm

3. Dùng hàm <iif-H>TênFile</iif-H> nạp ra

Hệ thống sẽ tự động bỏ đi tag input_txt, chỉ lấy ký tự sau /->/

4. Dùng hàm OpHtmlEdit_Cf để gọi sửa
/themes/lib_cm/common.js

OpHtmlEdit_Para_Cf(file,title,width,height)
Ví dụ:
<iif-H>test.htm</iif-H>
<iif-D>User:Login
   <In><a href="javascript:OpHtmlEdit_Para_Cf('/html/test.htm','xx',500,300)">SUA</a></In>
</iif-D>

Ví dụ có hình icon sửa:
<iif-H>test.htm</iif-H>
<iif-D>User:Login
   <In><a href="javascript:OpHtmlEdit_Para_Cf('/html/test.htm','xx',500,300)"><i class="fa fa-edit text-danger"></i></a></In>
</iif-D>


 

Mục liên quan: