C comefrom 新手上路 注册 2002-08-25 消息 459 荣誉分数 0 声望点数 0 2004-02-16 #1 如果好几个页面里都有同样的一段html代码,比如都有一个表格来显示签名档、照片等等,应该怎么办?有什么方法能达到共用代码的效果,CSS行吗?如果行,大概怎么写? 前提是不用frame。
苦逼热狗 路边通讯社社长 VIP 注册 2002-10-12 消息 47,112 荣誉分数 2,376 声望点数 393 2004-02-16 #2 javascript document.write 然后保存为js文件,共同地方******** language=javascript src=share.js>**********>
T terrence 知名会员 注册 2002-10-23 消息 1,489 荣誉分数 12 声望点数 148 2004-02-16 #3 把同样的html代码保存到单独的www.css文件中,然后在html中用下列方式引用: 〈style〉 @import url("www.css"); 〈/style〉
苦逼热狗 路边通讯社社长 VIP 注册 2002-10-12 消息 47,112 荣誉分数 2,376 声望点数 393 2004-02-21 #5 最初由 terrence 发布 把同样的html代码保存到单独的www.css文件中,然后在html中用下列方式引用: 〈style〉 @import url("www.css"); 〈/style〉 点击展开... 测试过了,无效 那个是给css用的不是html用的
最初由 terrence 发布 把同样的html代码保存到单独的www.css文件中,然后在html中用下列方式引用: 〈style〉 @import url("www.css"); 〈/style〉 点击展开... 测试过了,无效 那个是给css用的不是html用的
C chhuili 新手上路 注册 2003-04-11 消息 81 荣誉分数 0 声望点数 0 2004-02-21 #7 Put the common code in php files and use them by calling require or include. It works fine on our web site.
Put the common code in php files and use them by calling require or include. It works fine on our web site.
苦逼热狗 路边通讯社社长 VIP 注册 2002-10-12 消息 47,112 荣誉分数 2,376 声望点数 393 2004-02-21 #8 最初由 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........
最初由 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........
C chhuili 新手上路 注册 2003-04-11 消息 81 荣誉分数 0 声望点数 0 2004-02-21 #9 最初由 ???狗 发布 .......... 他问的html的问题,不是php........ 点击展开... php is the solution to html的问题, is not it ?
苦逼热狗 路边通讯社社长 VIP 注册 2002-10-12 消息 47,112 荣誉分数 2,376 声望点数 393 2004-02-21 #10 lol dude if he can use php, 他问这个问题干吗? php的话require, include的用法也不是很好 使用html template配合php的用法比require, include 通过调试,测试,运行速度,编译速度比往php代码里头塞入html代码快多了
lol dude if he can use php, 他问这个问题干吗? php的话require, include的用法也不是很好 使用html template配合php的用法比require, include 通过调试,测试,运行速度,编译速度比往php代码里头塞入html代码快多了
苦逼热狗 路边通讯社社长 VIP 注册 2002-10-12 消息 47,112 荣誉分数 2,376 声望点数 393 2004-02-21 #11 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. 我不掺和了
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. 我不掺和了
苦逼热狗 路边通讯社社长 VIP 注册 2002-10-12 消息 47,112 荣誉分数 2,376 声望点数 393 2004-02-21 #12 哦,忘了说了 如果你用share.js的话,最好在meta把cache设置清楚,那东西是client side script 如果你叶面有改动的话,用户本地代码是不会变动的,所以设置为不保存是个好主意