Skip to content

Instantly share code, notes, and snippets.

/**
* 单击[+]复制当前行
* 单击[-]删除当前行
*/
function copySelf(obj){
var curTrObj = $(obj).parent().parent();
var newTrObj = curTrObj.clone();
if($(obj).html() == "[+]"){
newTrObj.find('a').html('[-]');
curTrObj.after(newTrObj);
<?php
require_once dirname ( __FILE__ ) . '/../../configs/Constant.php';
require_once dirname ( __FILE__ ) . '/../../libs/common_function.php';
require_once dirname ( __FILE__ ) . '/../../bean/pagination.php';
require_once dirname ( __FILE__ ) . '/../../bean/descTransfer.php';
require_once dirname ( __FILE__ ) . '/../../bean/SmartyFactory.php';
require_once dirname ( __FILE__ ) . '/../../libs/ExcelClass/PHPExcel.php';
header ( "Content-Type:text/html;charset=utf-8" );
// const INVENTORY_ROOT = "http://query.app.inventory.ux168.cn:8080/inventory_app";
<?php
if (isset ( $_GET ['fetchAll'] ) && ! empty ( $_GET ['fetchAll'] )) {
//$file is like a container,tempnam is very interesting
$file = tempnam ( "tmp", "zip" );
$zip = new ZipArchive ();
$zip->open ( $file, ZipArchive::OVERWRITE );
$fileDir = dirname ( __FILE__ ) . "/../../download_files/";
$(function () {
//全不选
$("#btnAllNotChk").click(function () {
$("#chk input:checkbox").removeAttr("checked");
});
//全选
$("#btnAllChk").click(function () {
$("#chk input:checkbox").attr("checked", "checked");
});
//反选
@emojiijome
emojiijome / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console