评论评论标记(嵌套评论) [英] Commenting a commented markup (Nested comments)

查看:83
本文介绍了评论评论标记(嵌套评论)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < body>如何轻松地评论和取消评论一大段HTML标记,其中包含一些评论? 
很多加价
<! - comment - >
很多加价
<! - comment - >
很多加价
< / body>

以下内容无法按要求工作(关闭 - >停止评论部分):

 < body> 
<! -
大量加价
<! - comment - >
很多加价
<! - comment - >
大量加价
- >
< / body>

是否有其他方法?

解决方案

如果您没有< / style> * / 标签评论区使用:

 < style> 
/ *
评论
* /
< / style>

如果您没有< / script> * / 标记在评论区使用:

 < script> ; 
/ *
评论
* /
< / script>


How can I easily comment and uncomment a big chunk of HTML markup that that includes some comment?

<body>
a lot of markups
 <!-- comment -->
a lot of markups
 <!-- comment -->
a lot of markups
</body>

Following do not work as desired (closing --> stops the comment section):

<body>
  <!-- 
    a lot of markups
     <!-- comment -->
    a lot of markups
     <!-- comment -->
    a lot of markups
   -->
</body>

Is there any alternative method?

解决方案

If you have no </style> and */ tag in comment area use:

<style>
/*
comment
*/
</style>

If you have no </script> and */ tag in comment area use:

<script>
/*
comment
*/
</script>

这篇关于评论评论标记(嵌套评论)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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