Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个 Windows Phone 应用程序。XAML文件中有一个元素,我想在C#中引用它。getElementByIdJavaScript 中是否有 used 的等价物?
getElementById
例如,有两个文本字符串,一个Name等于1,另一个等于2。用户给出字符串输入1或2,因此文本被突出显示。现在,我想将此字符串输入从用户转换为参考,怎么做?
Name
1
2
要根据字符串在页面树中查找元素,请使用FindName方法