首页 \ 问答 \ HTML5有新标签文章,部分和旁边。(HTML5 has new tags article, section and aside. When should I use div tag?)

HTML5有新标签文章,部分和旁边。(HTML5 has new tags article, section and aside. When should I use div tag?)

我理解在HTML5上使用article,section和aside标签。 在许多方面,这些标签似乎取代了我们在HTML / XHTML上使用的div标签。 好吧,div标签也在HTML5上继续。 我可以在何时何地使用div标签进行更多语义标记?


I understand the use of article, section and aside tags on HTML5. In many ways, these tags seem to replace div tag we use on HTML/XHTML. Well, div tag is continued on HTML5 too. Where and when can I use div tag for more semantic markup?


原文:https://stackoverflow.com/questions/8414876
更新时间:2023-02-03 06:02

最满意答案

更改您的代码如下(我假设URLInput是主窗体上的控件):

private void HomePage_Click(object sender, EventArgs e)
{
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URLInput.Text);
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    StreamReader sr = new StreamReader(response.GetResponseStream());
    richTextBox1.Text = sr.ReadToEnd();
}

private void ChangeHomeToolStripMenuItem_Click(object sender, EventArgs e)
//this is menu item to call 
{
    using(Home h = new Home())
    {
        h.ShowDialog();
        var homePageUrl = h.getHomePage();
        if (string.IsNullOrEmpty(homePageUrl))
            return;
        URLInput.Text = homePageUrl;
    }
}

Change your code as follows (I assume that URLInput is a control on the main form):

private void HomePage_Click(object sender, EventArgs e)
{
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URLInput.Text);
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    StreamReader sr = new StreamReader(response.GetResponseStream());
    richTextBox1.Text = sr.ReadToEnd();
}

private void ChangeHomeToolStripMenuItem_Click(object sender, EventArgs e)
//this is menu item to call 
{
    using(Home h = new Home())
    {
        h.ShowDialog();
        var homePageUrl = h.getHomePage();
        if (string.IsNullOrEmpty(homePageUrl))
            return;
        URLInput.Text = homePageUrl;
    }
}

相关问答

更多
  • 由于安全原因,您无法在FF中执行此操作。 看看这篇文章 。 您的用户必须将signed.applets.codebase_principal_support设置更改为false。 可能不是值得依靠的东西。 You can't do it in FF because of security. Check out this article. Your user would have to change the signed.applets.codebase_principal_support setting t ...
  • 如文档页面上的注释中所述,您必须声明getElementById的doctype才能按预期执行 t =<<
    ...code continues ... 根据文档,必须为getElementById指定一个DTD,以了解元素的哪个属性被用作唯一标识符。 声明一个文档类型可以完成此操作。 你也可以使用setIdAttribute明确地设置它(不用DTD) ...
  • Mozilla / Firefox有一个加载用户主页的window.home()方法。 可以使用此方法(可能在iframe中)与服务器访问日志记录结合使用,以查看当前用户是否立即请求加载站点的主页。 但是,其他浏览器似乎不支持此JavaScript方法。 Mozilla/Firefox has a window.home() method which loads the user's home page. This method could be used (in an iframe, maybe) com ...
  • Internet Explorer可以询问给定的URL是否是主页,详细信息在此MSDN页面上 。 链接到此示例页面来演示API。 Internet Explorer makes it possible to ask it whether a given URL is the home page, it's detailed on this MSDN page. That links to this example page demonstrating the API.
  • 更改您的代码如下(我假设URLInput是主窗体上的控件): private void HomePage_Click(object sender, EventArgs e) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URLInput.Text); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader ...
  • 如果您想直接编辑模板,可以执行以下条件检查以查看是否正在显示主页: (假设您使用的是Joomla 2.5或3.x.有关更多信息和其他版本,请参阅此链接 ) getMenu(); if ($menu->getActive() == $menu->getDefault()) { echo '
    正如你所说你的response.data.token是未定义的,所以它不能存储在localStorage中。 但是对于你的用例 myToken = [{token:"token here"}] localStorage.setItem('token', JSON.stringify(myToken)); console.log(JSON.parse(localStorage.getItem('token'))[0].token); 作品 在开发者控制台中查看 按F12,然后在应用程序选项卡的左侧菜单中,展 ...
  • 批量大小只是告诉它一次要提取多少个对象。 这可能不会对你有很大的帮助。 让我们考虑一下你的用例... 用户键入“F”,并告诉数据库“查找所有以'F'开头的名称”,数据库查看所有10k +记录以查找以'F'开头的名称 然后,用户键入'r',所以您告诉数据库去查找以“Fr”开头的所有记录,并且再次查看所有10k +记录以找到以“Fr”开头的记录。 fetchBatchSize所做的一切就是告诉它:“嘿,当你在一张唱片中犯错时,立刻带上50张,因为我可能需要所有这些。” 这没有限制您的搜索。 但是,将fetchL ...
  • 您应该检查该进程的当前工作目录。 打印出来。 echo getcwd(); “install”应该是当前工作目录的父目录中的子目录。 You should check the current working directory for the process. Print it. echo getcwd(); "install" should be a subdirectory in current working directory's parent directory.
  • 您可以为/home进行重定向,并在当前规则之前保留该规则。 有这样的方式: DirectoryIndex index.php RewriteEngine On RewriteRule ^home/?$ / [L,R=302,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ index.php?pagina=$1 [L,QSA] # url rewrite ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)