gpt4 book ai didi

javascript - 我需要将文本放在一个 中,它位于一个 Div 中,该 Div 位于另一个 Div 中,该 Div 位于另一个 Div 中

转载 作者:行者123 更新时间:2023-11-28 03:00:58 28 4
gpt4 key购买 nike

我需要将文本放在 <h3> 中在一个 Div 中,在另一个 Div 中,在另一个 Div 中。所以这是它的样子:

 <div id="loginModal" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 0px; height: 193.8px;"><iframe hspace="0" src="/client/en_US/cntest/search/patronlogin/https:$002f$002farrowhead.ent.sirsi.net$002fclient$002fen_US$002fcntest$002fsearch$002faccount$003fdt$003dlist" name="dialog_iframeContent610" style="width:350px;height:215px;" frameborder="0"> </iframe></div>
<iframe hspace="0" src="/client/en_US/cntest/search/patronlogin/https:$002f$002farrowhead.ent.sirsi.net$002fclient$002fen_US$002fcntest$002fsearch$002faccount$003fdt$003dlist" name="dialog_iframeContent610" style="width:350px;height:215px;" frameborder="0"> </iframe>
#document
<!DOCTYPE html PUBLIC "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org
/TR/xhtml/DTD/xhtlm1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/core/default.css"><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/ctx/css/vse/css/Discovery_base.css"><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/ctx/css/format-types.css"><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/app/components/search/suggest.css"><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/core/tapestry-console.css"><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/core/t5-alerts.css"><link type="text/css" rel="stylesheet" href="/client/assets/4.5.1/core/tree.css"><meta content="Apache Tapestry Framework (version 5.3.7)" name="generator"><script src="/client/assets/4.5.1/stack/en_US/core.js" type="text/javascript"></script></head>
<body>
<div class="content"><center>
<div id="changePinDiv">
<h3 style="padding:0px;margin:0px;">Change PIN</h3>
<form onsubmit="javascript:return Tapestry.waitForPage(event);" action="/client/en_US/cntest/changepinplainpage.changepinpanel.changepinform?&amp;t:ac=HZWS/CN/region/$N/$N" method="post" id="changePinForm">
<div class="" style="display: none;">
<input value="HZWS/CN/region/$N/$N" name="t:ac" type="hidden">
<input value="NeH4a76dR7kxhv6iIEnzIQ/wdgE=:H4sIAAAAAAAAAJ2QsUoDQRCGxwMhmE6wsFcQkY2FabQxBAThkIPDOsxtxsuGvd11d87ExsqXsPEJxEqfIIWd7+AD2FhYWbg5CwVB0WZYPmbn+/lvnmFxImCrP0JTUqZMpjEOLGlXNsgp49CQFuNBHcgbrCh46FpfCnQoRyQYHQX2510hrSetClFgINErIkTJB4r0cC0nrt368az9tPLwlsBCCm1pDXurj+JFhuV0jGfY0VHZydkrU+5NHcPSp/UfKXt/TZl5KymEvC4qFYKyZnY73Dl5vX5MAKZusgkbvycI888c7fs/2qWtnDVkOIhGx9/lV/nL6v3dZT+BJIWW1CpuHw5P4aKpjzRVEczra9C8rtaHfLD95fkOfeiN7OIBAAA=" name="t:formdata" type="hidden">
</div>
<table><tbody><tr><td><label for="j_username" class="username">Barcode</label>:</td><td><input maxlength="30" class="user_name_input" id="j_username" name="j_username" type="TextField"><img id="j_username_icon" class="t-error-icon" alt="" src="/client/assets/4.5.1/core/spacer.gif" style="display: none;"></td></tr><tr><td colspan="2"><input value="Submit" class="loginButton" id="submit_0" name="submit_0" type="submit"></td></tr></tbody></table>
</form>
</div>
</center>
</div>
<script type="text/javascript">Tapestry.onDOMLoaded(function() {
Tapestry.init({"formEventManager":[{"formId":"changePinForm","validate":{"submit":true,"blur":true}}]});
Tapestry.init({"activate":["j_username"],"validate":[{"j_username":[["required","Barcode is a required field."]]}]});
});
</script></body></html>

我希望我加载正确。我需要更改文本的部分在“div id="changePinDiv"”中,在那个 div 中有一个 <h3>。有我想改变的文字。任何时候我尝试通过 CSS 完成它都不需要。

这是我尝试过的

#changePinDiv:before{
content:"You must have an email address assigned to your account.";
font-size:10px;
font-weight:bold;
}

我试过了

#changePinDiv.h3:before{
content:"You must have an email address assigned to your account.";
font-size:10px;
font-weight:bold;
}

不知道还能做什么。任何帮助将非常感激。

最佳答案

如果您想通过 CSS 将内容注入(inject)您的 <h3>样式是这样的:

#changePinDiv h3:before{
content:"You must have an email address assigned to your account.";
font-size:10px;
font-weight:bold;
}

但这会产生一个 <h3>看起来像这样:

<h3>You must have an email address assigned to your account.Change Pin</h3>

放置此内容可能会赚更多 :after并包含一个空格:

#changePinDiv h3:after{
content:" You must have an email address assigned to your account.";
font-size:10px;
font-weight:bold;
}

查看此 fiddle

或者你可以让内容像这样换行:

#changePinDiv h3:after{
content:"You must have an email address assigned to your account.";
display: block;
font-size:10px;
font-weight:bold;
}

参见 here

更新

由于它是一个 iframe,如果它托管在您的域中,您可以使用 jQuery 来执行如下操作:

$("iframe").contents().find("#changePinDiv h3").append(" You must have an email address assigned to your account.");

关于javascript - 我需要将文本放在一个 <h> 中,它位于一个 Div 中,该 Div 位于另一个 Div 中,该 Div 位于另一个 Div 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46204660/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com