0
Y at-il un moyen de convertir le type d'entrée = texte Span dans ASP.NetComment convertir input type = Texte à Span
Y at-il un moyen de convertir le type d'entrée = texte Span dans ASP.NetComment convertir input type = Texte à Span
Vous devriez vraiment fournir plus d'informations sur le scénario que vous voulez faire cela pour, mais voici quelques uns génériques.
if(ChangeTextToSpan) { //some condition to check, could be a query string or what ever
this.Label1.Text = this.TextBox1.Text;
this.Label1.Visible = !this.TextBox1.Visibile = false;
}
function swapTextBox(changeTextToSpan) {
if(changeTextToSpan) { //again, do a condition
var span = document.getElementById('<%= this.Label1.ClientID %>');
var txt = document.getElementById('<%= this.TextBox1.ClientID %>');
span.innerHTML = txt.value;
span.style.display = 'inline';
txt.style.display = 'none';
}
}
setTimeout(10000, swapTextBox(true)); //after 10 seconds it'll swap