一个用html做网页的问题,求助!

comefrom

新手上路
注册
2002-08-25
消息
459
荣誉分数
0
声望点数
0
如果好几个页面里都有同样的一段html代码,比如都有一个表格来显示签名档、照片等等,应该怎么办?有什么方法能达到共用代码的效果,CSS行吗?如果行,大概怎么写?
前提是不用frame。
 
javascript
document.write

然后保存为js文件,共同地方******** language=javascript src=share.js>**********>
 
javascript 的 document.write 应该是可以的
 
Put the common code in php files and use them by calling require or include. It works fine on our web site.
 
最初由 chhuili 发布
Put the common code in php files and use them by calling require or include. It works fine on our web site.
..........
他问的html的问题,不是php........
 
最初由 ???狗 发布

..........
他问的html的问题,不是php........
php is the solution to html的问题, is not it ?
 
lol
dude
if he can use php, 他问这个问题干吗?
php的话require, include的用法也不是很好
使用html template配合php的用法比require, include
通过调试,测试,运行速度,编译速度比往php代码里头塞入html代码快多了
 
rofl, man, we will stuck on this question all day long. I have spent 4 years on php programming, there is no point to discuss such question for me.
Indeed, it can be solved in "PHP" way. So, u r right.

Congratulations, you won. 我不掺和了
 
哦,忘了说了
如果你用share.js的话,最好在meta把cache设置清楚,那东西是client side script
如果你叶面有改动的话,用户本地代码是不会变动的,所以设置为不保存是个好主意
 
后退
顶部