English 中文(简体)
怎么能够做像用C语言编码一样的 j?
原标题:How can i do jQuery like coding in C language?

如何打上像用C语言打听的那样高乐?

我们有一套包裹(例如:html):

<div id="mymute"> 
 <div>
 </div>
 <div>
   <img src="/agents/sleeping.png" />
 </div>
 <div>
 </div>
</div>

Javascript/Jquery 询问包装、发现图像标签和更新电弧特性。 仅作此改动:

$( #mymute ).find( div ).find( img ).attr( src , /agents/wakeUP.png ); 

但是,在C中,我如何能够做这样的事情? (不是如何划线,而是如何履行这种职能(职能)。

主要c:

int
main () {
"This is a html string".cWayFind("is").cWayFind("etc etc").cWayModify(properties, tonewProperties);

 return 0;
}
最佳回答

这里有一个很大的开端:

问题回答

你们可能希望使用C++。 在那里,从能够参考同样基本数据的功能中提取物体非常容易。 一、导 言

 struct DOMNode {
      DOMNode Find (const char* name);
 };

您可以立即打字DOMNode (.Find(“foo”));Find(“bar”);, 无需特殊礼仪。

如果您想修改该标的本身,仅提及this

 struct DOMNode {
      DOMNode& SetAttribute (const char* name, const char* value) { /* ... */; return *this; }
 };

做这样的事情通常会通过接收人,即this,作为每项职能的第一个论点。

cWayModify(cWayFind(cWayFind("This is a html string", "is"), "etc etc"), properties, tonewProperties);

内部职能呼吁首先得到评估。 采用避孕方法的理论操作者实际上只是合成糖,使该守则更加可读;评估的首项行动首先出现在一条有条链的法典。

你们需要一个在C++中执行的 j类子。 现在我不知道存在任何情况。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签