如何在运行时添加所需的元素 [英] How to add required element at run time
本文介绍了如何在运行时添加所需的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在点击按钮时将required =元素添加到文本框
我尝试过:
我试过了
Attributes.Add(class,@required =);
I want to add required="" element to textbox when button is clicked
What I have tried:
I'm tried
Attributes.Add("class",@"required=""");
推荐答案
试试jquery
try jquery
(function(){
(function() {
(#buttonid)。click(function(){
( "#buttonid" ).click(function() {
这篇关于如何在运行时添加所需的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文