如何使用文本框在ASP.NET中显示警报

编程入门 行业动态 更新时间:2024-10-12 01:29:31
本文介绍了如何使用文本框在ASP.NET中显示警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在asp中显示警告,警告文本应该来自textbox1

I would like to show an alert in asp and the alert text should be from textbox1

<div id="myAlert" class="alert alert-danger collapse" > <a id="linkClose" href="#" class="close">×</a> Fixed Text is here </div>

此代码将在按钮点击时执行,我需要显示 Textbox1的文本代替固定文字在这里 再次澄清:我需要将Textbox1值传递给asp代码 我尝试过: 我从谷歌那里得到了这个,但是在尝试多次后仍然不知道如何实现

This code will execute on button click, I need to show text of Textbox1 in the place of Fixed Text is here Again for Clarification : I need to Pass Textbox1 value to the asp code What I have tried: I got this from google ,But still no idea how to implement after trying many times

function AlertText() { alert($("#TextBox1").val()); <!-- goal: to display the text from Textbox1. --> }

任何帮助都将受到高度赞赏

Any Help would be highly appreciated

推荐答案

(#TextBox1)。 VAL()); <! - goal:显示Textbox1中的文本。 - > } ("#TextBox1").val()); <!-- goal: to display the text from Textbox1. --> }

任何帮助都将受到高度赞赏

Any Help would be highly appreciated

更多推荐

如何使用文本框在ASP.NET中显示警报

本文发布于:2023-11-27 16:07:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638683.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:警报   如何使用   文本框   ASP   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!