类= QUOT;" [英] class=""

查看:61
本文介绍了类= QUOT;"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


是否可以使用空类属性值,例如


< href =" url"类= QUOT;"> LINK< / A> ?

Hi all

Is it OK to have empty class attribute values, such as

<href="url" class="">link</a> ?

推荐答案

JD< us ** @ example.net>写道:
JD <us**@example.net> wrote:
是否可以使用空类属性值,例如

< href =" url"类= QUOT;"> LINK< / A> ?
Is it OK to have empty class attribute values, such as

<href="url" class="">link</a> ?




为什么?


-

Spartanicus



Why?

--
Spartanicus


Spartanicus写道:
Spartanicus wrote:
JD< us ** @ example.net>写道:

JD <us**@example.net> wrote:

是否可以使用空类属性值,例如

< href =" url"类= QUOT;"> LINK< / A> ?
Is it OK to have empty class attribute values, such as

<href="url" class="">link</a> ?



为什么?


Why?




我有一个ASP功能,可以绘制十几页的链接菜单。

函数确定调用该函数的页面,并为该页面的链接分配一个CSS

类,使其变为粗体。为了实现这一点,

函数使一堆变量变暗并为每个变量分配空字符串,然后执行条件语句来分配已选择的变量。 CSS课程

调用页面的链接。


因此用户的浏览器最终得到:


< li>< a href =" url" class =""> link< / a>< / li>

< li>< a href =" url" class =""> link< / a>< / li>

< li>< a href =" url" class =" selected"> link< / a>< / li>

< li>< a href =" url" class =""> link< / a>< / li>


页面不是我的,CSS太乱了,无法开始更改,但

我仍​​然想知道这是否正常或我是否应该重新编码该功能?



I have an ASP function that draws a links menu for a dozen pages. The
function determines which page is calling the function and assigns a CSS
class to that page''s link to make it bold. For this to work, the
function dims a bunch of variables and assigns empty strings to each,
then does a conditional statement to assign the "selected" CSS class to
the calling page''s link.

So the user''s browser ends up with:

<li><a href="url" class="">link</a></li>
<li><a href="url" class="">link</a></li>
<li><a href="url" class="selected">link</a></li>
<li><a href="url" class="">link</a></li>

The page is not mine and the CSS is too messy to start changing, but
still I''m wondering if this is OK or whether I should re-code the function?


JD< us ** @ example.net>写道:
JD <us**@example.net> wrote:
是否可以使用空的类属性值,例如

< HREF =" URL"类= QUOT;"> LINK< / A> ?
Is it OK to have empty class attribute values, such as

<href="url" class="">link</a> ?



为什么?



Why?



我有一个ASP函数可以绘制十几页的链接菜单。



I have an ASP function that draws a links menu for a dozen pages.




在ASP组中询问如何更改它以便它不会注入无意义的

类属性。


- -

Spartanicus



Ask in an ASP group how to change it so that it doesn''t inject pointless
class attributes.

--
Spartanicus


这篇关于类= QUOT;&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆