Git Product home page Git Product logo

dbshop's Introduction

dbshop

发布商品、选择属性

介绍

  • dbshop.js的主要功能就是勾选一个或多个商品属性,生成表格,依赖jQuery;
  • 可多组属性,完全自适应;
  • 演示地址:dbshop.js,也可查看示例,或下载到本地运行; 视图

里面会涉及到表格生成的算法,文字方面我不也知道怎么表述...,如果是指着示例讲,可能会好点。 所以如果有不明白的地方就给我发信息吧...

用法

html:

  • 每组属性必须添加class='J_Prorow'和data-index="0"(0是可变的,第一个属性就是0,第二个就是1,以此类推)。

  • 勾选input必须添加class="J_Checkbox"和value="sx1:1"("sx1"表示每组属性唯一键名,用于获取JSON的KEY名,"1"表是排序)

  • table必须添加id="J_table"

<div class="col-md-11 J_Prorow" data-index="0">
	<label class="checkbox-inline">
	  <input type="checkbox" class="J_Checkbox" value="sx1:1">
	  <input type="text" value="军绿色" class="form-control" name="color" disabled="disabled">
	</label>
	<label class="checkbox-inline">
		<input type="checkbox" class="J_Checkbox" value="sx1:2">
		<input type="text" value="黑色" class="form-control" name="color" disabled="disabled">
	</label>
	<label class="checkbox-inline">
	  <input type="checkbox" class="J_Checkbox"  value="sx1:3">
		<input type="text" value="天蓝色" class="form-control" name="color" disabled="disabled">
	</label>
</div>
<table class="table table-bordered" id="J_table">
	<thead>
		<tr>
			<th>颜色</th>
			<th>尺码</th>
			<th>风格</th>
			<th>魅力</th>
			<th>价格</th>
			<th>数量</th>
			<th>条码</th>
		</tr>
	</thead>
	<tbody></tbody>
</table>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.