在C++中,“col”是什么意思?怎么用?

在C++中,“col”是什么意思?怎么用?,第1张

col 是从英文单词column变化过来的!没什么特别的意思

它就像你定义的 a,b,c,i,j,k 是以个意思!

用英文单词column的缩写为了方便别的程序员阅读!

column是一列,或一行的意思!

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Bootstrap 4</title>

<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css"

integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<link rel="stylesheet" href="bootstrap-colorpicker/css/bootstrap-colorpicker.css">

<link rel="stylesheet" href="bootstrap-datepicker/css/bootstrap-datetimepicker.min.css">

<style type="text/css">

.main-box {

width: 640px

margin: 40px auto

}

</style>

</head>

<body>

<div class="main-box">

<form>

<div class="form-group row">

<label for="name" class="col-sm-2 col-form-label">用户名</label>

<div class="col-sm-10">

<input type="text" class="form-control" id="name" placeholder="请输入用户名">

</div>

</div>

<div class="form-group row">

<label for="pwd" class="col-sm-2 col-form-label">密码</label>

<div class="col-sm-10">

<input type="password" class="form-control" id="pwd" placeholder="请输入密码">

</div>

</div>

<div class="form-group row">

<label for="pwd2" class="col-sm-2 col-form-label">确认密码</label>

<div class="col-sm-10">

<input type="password" class="form-control" id="pwd2" placeholder="请输入确认密码">

</div>

</div>

<div class="form-group row">

<label for="area" class="col-sm-2 col-form-label">区域</label>

<div class="col-sm-10">

<select class="form-control form-control-lg" id="area">

<option>四川省</option>

</select>

</div>

</div>

<fieldset class="form-group">

<div class="row">

<legend class="col-form-label col-sm-2 pt-0">性别</legend>

<div class="col-sm-10">

<div class="form-check form-check-inline">

<input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"

checked="true">

<label class="form-check-label" for="inlineRadio1">男</label>

</div>

<div class="form-check form-check-inline">

<input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2">

<label class="form-check-label" for="inlineRadio2">女</label>

</div>

</div>

</div>

</fieldset>

<div class="form-group row">

<label for="age" class="col-sm-2 col-form-label">年龄</label>

<div class="col-sm-10">

<input type="email" class="form-control" id="age" placeholder="请输入年龄">

</div>

</div>

<div class="form-group row">

<label for="age" class="col-sm-2 col-form-label">生日</label>

<div class="col-sm-10">

<input size="16" type="text" value="2012-06-15" readonly class="form-control form_datetime">

</div>

</div>

<div class="form-group row">

<label for="phone" class="col-sm-2 col-form-label">手机号</label>

<div class="col-sm-10">

<input type="text" class="form-control" id="phone" placeholder="请输入手机号">

</div>

</div>

<div class="form-group row">

<label for="phone" class="col-sm-2 col-form-label">头像</label>

<div class="col-sm-10">

<input type="file" class="form-control-file" id="exampleFormControlFile1">

</div>

</div>

<div class="form-group row">

<label for="site" class="col-sm-2 col-form-label">主页</label>

<div class="col-sm-10">

<input type="text" class="form-control" id="site" placeholder="请输入主页">

</div>

</div>

<div class="form-group row">

<label for="email" class="col-sm-2 col-form-label">Email</label>

<div class="col-sm-10">

<input type="email" class="form-control" id="email" placeholder="请输入Email">

</div>

</div>

<div class="form-group row">

<label class="col-sm-2 col-form-label">喜欢的颜色</label>

<div class="col-sm-10">

<input id="likeColor" type="text" class="form-control" value="#5367ce" />

</div>

</div>

<div class="form-group row">

<div class="col-sm-2"></div>

<div class="col-sm-10">

<div class="form-check">

<input class="form-check-input" type="checkbox" value="" id="defaultCheck1">

<label class="form-check-label" for="defaultCheck1">

同意服务条款

</label>

</div>

</div>

</div>

<div class="form-group row">

<div class="col-sm-10">

<button type="submit" class="btn btn-primary">注册</button>

<button type="submit" class="btn">取消</button>

</div>

</div>

</form>

</div>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"

integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">

</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"

integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">

</script>

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"

integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">

</script>

<script src="bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>

<script src="bootstrap-datepicker/js/bootstrap-datetimepicker.min.js"></script>

<script>

$('#likeColor').colorpicker()

$(".form_datetime").datetimepicker({

format: 'yyyy-mm-dd',

weekStart: 1,

todayBtn:  1,   //今日日期按钮

autoclose: 1,   //自动关闭

todayHighlight: 1,   //高亮今日日期

startView: 2,       //从日期视图开始

minView: 2,

forceParse: 0

})

</script>

</body>

</html>

案例下载

按id号从小到大排列

sql = "select * from tablename order by id asc"

按id号从大到小排列

sql = "select * from tablename order by id desc"

举例如下:

下面是一段正常的源码,它可以正常查询出倒序结果:

<!--#include file="conn.asp" -->

<head>

<title>回眸一笑</title>

<style><!--@import url(in/index.css)--></style>

<style><!--@import url(in/layer.css)body,td,th {

font-family: 宋体

color: #000

}

--></style>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312"></head>

<body text="#000000" >

<div id="newest">

<div id="ntitle" align="right">最新10篇帖子:</div>

<div id="space"></div>

<div id="nmarquee">

<table width="100%" height="12" border="0" cellpadding="0" cellspacing="0">

<tr>

<td id=demo1>

<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">

<tr>

<%

Dim nSql

nSql="Select top 10 * From [Dv_Topic] Order By TopicID DESC"

Dim nRs

Set nRs=Server.CreateObject("ADODB.RecordSet")

nRs.Open nSql,Conn1,1,1

while not nRs.eof

%>

<td height="17"><table width="500"><tr><td width="492" height="10">

<a href='../../xiabbs/Dvbbs8.2.0_Ac/dispbbs.asp?TopicIDid=<%=nRs("TopicID")%>'>

<strong><font color="#333366"><%=left(nRs("PostUserName"),5)%></font></strong>

<font color="#FF3366">发贴于 </font>

<strong><font color="#333366"><%=left(nRs("DateAndTime"),12)%></font></strong>:<%=left(nRs("Title"),20)%>

</a></td></tr></table></td>

<%

nRs.movenext

wend

nRs.close:set nRs = nothing

%>

但是把它的链接更改,使它指向其它ID,但查询结果却顺序显示了。代码如下:

<!--#include file="conn.asp" -->

<head>

<title>回眸一笑</title>

<style><!--@import url(in/index.css)--></style>

<style><!--@import url(in/layer.css)body,td,th {

font-family: 宋体

color: #000

}

--></style>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312"></head>

<body text="#000000" >

<div id="newest">

<div id="ntitle" align="right">最新10篇帖子:</div>

<div id="space"></div>

<div id="nmarquee">

<table width="100%" height="12" border="0" cellpadding="0" cellspacing="0">

<tr>

<td id=demo1>

<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">

<tr>

<%

Dim nSql

nSql="Select top 10 * From [Dv_Topic] Order By TopicID DESC"

nSql="Select top 10 * From [Dv_Topic] Order By boardid DESC"<!--这里添加了查询表,以为下面链接提供ID链接-->

Dim nRs

Set nRs=Server.CreateObject("ADODB.RecordSet")

nRs.Open nSql,Conn1,1,1

while not nRs.eof

%>

<td height="17"><table width="500"><tr><td width="492" height="10">

<!--下面的链接添加了boardid以便动态链接。-->

<a href='../../xiabbs/Dvbbs8.2.0_Ac/dispbbs.asp?boardid=<%=nRs("boardid")%>&id=<%=nRs("TopicID")%>'>

<strong><font color="#333366"><%=left(nRs("PostUserName"),5)%></font></strong>

<font color="#FF3366">发贴于 </font>

<strong><font color="#333366"><%=left(nRs("DateAndTime"),12)%></font></strong>:<%=left(nRs("Title"),20)%>

</a></td></tr></table></td>

<%

nRs.movenext

wend

nRs.close:set nRs = nothing

%>


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/8347867.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存