首页 技术 正文
技术 2022年11月11日
0 收藏 538 点赞 2,266 浏览 896 个字
ASP中双引号单引号和&连接符使用技巧一、ASP中处在双引号中的可以是任意的字符、字符串,HTML代码  1.<%response.write ("I am here")%><%response.write ("cnbruce here")%>  2.<%response.write ("<b>I am here</b>")%>  3.<双引号为就近匹配,如有单引号AND连接符包含于和连接将<延后引号>>response.write("I am here")  因为color的前引号和write的前引号形成匹配,内容为I am here。最终结果是:中间的 #0000ff 被孤单了  <%response.write("<font color=" & "#0000ff" & ">I am here</font>")%>
<%  response.write("cnbruce")  %>  二、单引号:如学习语文课一样,继续放在双引号中的引号可以采用单引号  response.write("I am here")  三、ASP中&号的主要作用是用来连接的,包括:字符串-字符串、字符串-变量、变量-变量等混合连接  <%
  mycolor="#0000ff"
  response.write ("<font color= "&mycolor&" >" & "cnbruce" & "</font>")
  %>
<%  mycolor="#0000ff"  response.write ("" & "cnbruce" & "")  %>  单引号(双引号中不用)中<变量保持>关键写法:<将ASP中的变量继续添加左右的"&包括>,就可以放到response.write的引号中了,效果即为:response.write(" "&mycolor&" ")  注:asp<输出response主要处理变量,字符串,html代码>(对单一标记可做为字符串来处理)  response.write"a"  response.write("a")  显示一样都是输出的<字符串a,>  而response.write(a)和<%=a%><%=a%>输出的是变量a 的值

  

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,087
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,562
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,412
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,185
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,821
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,905