当我单击带有href函数的<a>元素时,它无法工作。
function Sidebar() {
function toggleChange(e) {
e.preventDefault();
const el = document.getElementById("dashboard-button");
el.className="nav-link";
}
return(
<div>
<li class
我使用以下代码从IHTMLDocument2获取所有链接:
procedure DoDocumentComplete(const pDisp: IDispatch; var URL: OleVariant);
var
Document:IHTMLDocument2;
Body:IHTMLElement;
Links:IHTMLElementCollection;
i:integer;
tmp:IHTMLElement;
begin
try
Document := (pDisp as IWebbrowser2).Document AS IHTMLDocument2;