摘要:
数据: $data = array( array( 'id' => 1, 'parent_id' => 0, 'name' => 'first' ), array( 'id' => 2, 'parent_id' => 1, 'name' => 'second' ), array( 'id' => 3 阅读全文
摘要:
html代码: js代码: var string =""; for (var i = 0; i < 5; i++) { string += Math.floor(Math.random() * 10) } $('.wap_store_img').each(function(){ this.src = 阅读全文
摘要:
首先,在function.php方法文件中封装一个获取header头文件的方法。 if (!function_exists('getallheaders')) { function getallheaders() { $headers = array(); foreach ($_SERVER as 阅读全文
摘要:
首先,在静态页面中,添加微信的配置文件,通过js获取。 <script type="text/javascript"> wx.config({ debug: false, appId: '{$signPackage.appId}', timestamp: '{$signPackage.timesta 阅读全文
摘要:
问题出现描述:当对列表中某个图片进行重新编辑时,提交后会发现图片列表仍会出现修改之前的图片,新图片并未覆盖。 问题出现原因:缓存问题。 解决办法:通过js方法,在每张图片路劲后面添加一个随机数,这样每次加载就会重新提交数据,避免因数据相同直接从缓存中取数据。 代码展示: html部分,<img sr 阅读全文
摘要:
var week = [6,0,1,2,3,4,5]; $('.HotShop_head .HotShop_tab:eq('+week[new Date().getDay()]+')').click(); 阅读全文