极速模式/
<meta name="renderer" content="webkit">
radio赋值/
<script>
$("input[name='user_id'][value=66]").attr("checked",true);
$("input[name='user_id']:checked").val();
</script>
checkbox
是否选中:$("input[type='checkbox']").is(':checked');
取值:$("input[type='checkbox']").attr('value');
赋值:$("#cb1").attr("checked",true);
$("#cb1").attr("checked",false);
///
ab32有上传图片的代码uplodify
jquery chosen ab80 js/action.php中有2个操作
更新
$(a).get(0).selectedIndex=0;
$(a).trigger('chosen:updated');
/点增加,出现
var c='#shangpin_id'+j;
$(c).chosen();
/
ab82有好的三级联动
/
时间段:
<pre class="prettyprint" id="time1" style="display:none">
$.calendar({ format:'yyyy-MM-dd' });
</pre>
<input class="runcode" name="time1" style="width:100px; background-color:#FFFFFF" value="<?php echo $time1;?>"/>------
<pre class="prettyprint" id="time2" style="display:none">
$.calendar({ format:'yyyy-MM-dd' });
</pre>
<input class="runcode" name="time2" style="width:100px; background-color:#FFFFFF" value="<?php echo $time2;?>"/>
<?php
if($time1&&$time2){
$time1=strtotime($time1);
$time2=strtotime($time2)+60*60*24-1;
$where.=" and a.add_time>='$time1' and a.add_time<='$time2'";
}
?>
/
<li>
<span class="aaa"><label>备注</label>
<textarea name="beizhu" class="dfinput" style="width:200px; height:50px"></textarea></span>
</li>
<script charset="utf-8" src="js/keditor/kindeditor-min.js"></script>
<script charset="utf-8" src="js/keditor/lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
allowFileManager : true,
afterBlur : function(){ this.sync();}//编辑器失去焦点时直接同步,可以取到值
});
});
</script>
<li style="padding-top:10px">
<label>详情</label><textarea name="content" style="width:600px;height:400px;visibility:hidden;"></textarea>
</li>
/
<select name="cid" id="cid" class="dfinput2" style="width:150px">
<option value="">请选择</option>
<?php
make_select_article_classes("classhangpin_id",0,"ab105_fenlei",1);
?>
</select>
图片/
<?php
$last_id=mysql_insert_id();
if($a=upload('upfile1','img')){
$img_src=$a;
$img_size=$_FILES[upfile1][size];
$db->query("update ab105_shangpin set img_src='$img_src' where shangpin_id='$last_id'");
}
if($a=upload('upfile1','img')){
$row=$db->getRow("select * from ab105_user_record where user_id='$user_id'");
@unlink($row[erweima]);
$img_src=$a;
$img_size=$_FILES[upfile1][size];
$db->query("update ab105_user_record set erweima='$img_src' where user_id='$user_id'");
}
?>
<li>
<span class="aaa" style="width:1020px;"><label>商品图片:</label><input type="file" name="upfile1" id="upfile1" class="inputa" style="width:200"></span>
</li>
/
客服:
<select name="user_id" id="user_id" class="dfinput">
<option value="">-请选择-</option>
<?php
$r1=$db->getAll("select * from ab82_user_record where cat_id='-2'");
foreach($r1 as $v){
?>
<option value="<?php echo $v[user_id]?>"><?php echo $v[name]?></option>
<?php }?>
</select><script>$('#user_id').val('<?php echo $_GET[user_id];?>')</script>
//
按钮/
<button class="layui-btn layui-btn-small layui-btn-normal" onclick="this.form.submit();">搜索</button>
省市县/
<li><span><label>省:</label><select id="sheng" name="sheng" size="1" class="dfinput1" ></select></span></li>
<li><span><label>市:</label><select id="shi" name="shi" size="1" class="dfinput1" ></select></span></li>
<li><span><label>区县:</label><select id="xian" name="xian" size="1" class="dfinput1" ></select></span></li>
<script type="text/javascript" src="js/jsAddress.js"></script>
<script type="text/javascript">
addressInit('sheng', 'shi', 'xian','<?php echo $re[sheng]?>','<?php echo $re[shi]?>','<?php echo $re[xian]?>');
</script>
表格中编辑/
<td>
<textarea name="beizhu_huiyuan" class="dfinput" style="width:300px;height:30px"><?php echo $v[beizhu_huiyuan]?></textarea>
<a href="javascript:beizhu_huiyuan('<?php echo $v[huiyuan_id]?>');" style="text-decoration:underline; color:blue" >编辑</a>
</td>
导出excel/
<button class="layui-btn layui-btn-normal" onclick="window.location='excel1.php?wangdian_id=<?php echo $_GET[wangdian_id]?>&cat_id=<?php echo $_GET[cat_id]?>&yewu_id=<?php echo $_GET[yewu_id]?>&time1=<?php echo $_GET[time1]?>&time2=<?php echo $_GET[time2]?>&time3=<?php echo $_GET[time3]?>&time4=<?php echo $_GET[time4]?>&user_id=<?php echo $_GET[user_id]?>&kehu_name=<?php echo $_GET[kehu_name]?>&kehu_tel=<?php echo $_GET[kehu_tel]?>'">导出excel</button>
str循环/
<?php
$str=substr($str,0,-1);
$arr=explode(",",$str);$time1=time();
foreach($arr as $v){
//记录
$db->query("insert into ab105_chongzhi(huiyuan_id,chognzhijine,zengsongjine,add_time) values()");
}
?>
父窗口,子窗口-赋值,取值/
$("#guige_id1",window.parent.document).val(s[0]);
回车提交表单/
<script language="javascript">
document.onkeydown = function(e) {
e = e || window.event;
if(e.keyCode == 13) {
myform.submit();
return false;
}
}
</script>
一些记录
最新推荐文章于 2022-11-09 17:41:59 发布