Javascript是/否

编程入门 行业动态 更新时间:2024-10-07 00:13:51
本文介绍了Javascript是/否的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好, 我搜索了一些例子,但是没有真正的利用,对于JS功能 显示用户是/否对话框。 基本上,我有一个ASP应用程序,它在ASP 页面上显示一个SQL表。 我有创建了一个删除每个记录的超链接(循环)我需要使用OnClick事件,所以当用户点击这个超链接时,它会显示这个 是/否对话框。 /> 目前,超链接只删除相关记录。 我需要一个OnClick事件,当用户点击时显示是/否框 是 - 它去了remove.asp,当点击No时它什么也没做。 用户点击记录>旁边的删除是/否对话>是= remove.asp否= 结束。 ***** ***** 当前超链接(在查询字符串中传递ID变量 - 需要通过javascript 维护: < ; a href =" remove.asp?ID =<%= server.URLEncode(RS(" ID")))%>">删除< / a> ** *** ***** 我们非常感谢任何代码/帮助。 谢谢 - 提前致谢 Fawke 请删除ANTI和垃圾邮件 来自我的电子邮件地址,然后通过电子邮件发送给我。 www.bradflack

Hi there, I have searched for some examples, but to no real avail, for a JS function that displays a user Yes/No dialog box. Basically, i have an ASP application that displays a SQL table on an ASP page. I have created a "Remove" hyperlink (in a loop) by each record and i need to use an OnClick event so when the user clicks this hyperlink it displays this Yes/No dialog. At the moment the hyperlink simply removes the relevant record. I need an OnClick event that displays a Yes/No box that when the user clicks Yes - it goes to remove.asp, and when No is clicked it does nothing. User Clicks Remove next to record > Yes/No dialog> Yes = remove.asp No = End. ***** ***** Current Hyperlink (passing ID variable in querystring - needs to be maintained through the javascript: <a href="remove.asp?ID=<% =server.URLEncode(RS("ID"))%>">Remove</a> ***** ***** Any code/help would be much appreciated. Thanks -- Thanks in advance Fawke Please remove ANTI and SPAM from my email address before emailing me. www.bradflack

推荐答案

Fawke101写道: Fawke101 wrote: 你好, <我已经搜索了一些例子,但是没有真正的用处,对于JS功能显示用户是/否对话框。基本上,我有一个ASP a在ASP页面上显示SQL表的应用程序。 我创建了一个删除页面。每个记录的超链接(循环)我需要使用OnClick事件,所以当用户点击这个超链接时,它会显示这个是/否对话框。目前超链接只是删除相关记录。 我需要一个OnClick事件,显示一个Yes / No框,当用户点击时是 - 它转到remove.asp,当点击No时它会什么都没有。 用户点击删除记录>旁边是/否对话>是= remove.asp否= 结束。 ***** 当前超链接(在查询字符串中传递ID变量 - 需要通过javascript 进行维护: < a href =" remove.asp?ID =<%= server.URLEncode(RS(" ID"))%>">删除< / a> ***** ***** Hi there, I have searched for some examples, but to no real avail, for a JS function that displays a user Yes/No dialog box. Basically, i have an ASP application that displays a SQL table on an ASP page. I have created a "Remove" hyperlink (in a loop) by each record and i need to use an OnClick event so when the user clicks this hyperlink it displays this Yes/No dialog. At the moment the hyperlink simply removes the relevant record. I need an OnClick event that displays a Yes/No box that when the user clicks Yes - it goes to remove.asp, and when No is clicked it does nothing. User Clicks Remove next to record > Yes/No dialog> Yes = remove.asp No = End. ***** ***** Current Hyperlink (passing ID variable in querystring - needs to be maintained through the javascript: <a href="remove.asp?ID=<% =server.URLEncode(RS("ID"))%>">Remove</a> ***** *****

< a href ="#" onclick =" customConfirm(''remove.asp?ID =<% = server.URLEncode(RS(" ID")))%> ;'');返回false">删除< / a> customConfirm是一个接受URL作为参数的函数, 然后显示屏幕中央有一个DIV,带有两个按钮。 按钮会有点击,点击后会无所事事 (NO按钮)或设置位置。 href到remove.asp页面。 - 兰迪 机会有利于预备心灵 comp.lang.javascript常见问题 - jibbering/faq/

感谢您的及时回复...... 抱歉是一个痛苦,我不是JS开发人员,这有什么例子吗? 谢谢很多 - 提前致谢 Fawke 请删除ANTI和垃圾邮件 来自我的电子邮件地址,然后给我发电子邮件。 www.bradflack " Randy Webb" <喜************ @ aol>在消息中写道 新闻:kv ******************** @ comcast ... Thanks for your prompt reply...... Sorry to be a pain, i am no JS developer, Any examples of this? Thanks so much -- Thanks in advance Fawke Please remove ANTI and SPAM from my email address before emailing me. www.bradflack "Randy Webb" <hi************@aol> wrote in message news:kv********************@comcast... Fawke101写道: Fawke101 wrote: 嗨那里, 我搜索了一些例子,但是没有真正有用,因为JS 函数显示用户是/否对话框基本上,我有一个ASP应用程序,它在ASP页面上显示一个SQL表。 我创建了一个删除框。每个记录的超链接(循环)和i 需要使用OnClick事件,所以当用户点击这个超链接时,它会显示这个是/否对话框。目前超链接只是删除相关记录。 我需要一个显示是/否框的OnClick事件,当用户单击是时 - 它转到remove.asp,当单击否时它会执行什么都没有。 用户点击删除记录>旁边是/否对话>是= remove.asp否= 结束。 ***** 当前超链接(在查询字符串中传递ID变量 - 需要通过javascript 进行维护: < a href =" remove.asp?ID =<%= server.URLEncode(RS(" ID"))%>">删除< / a> ***** ***** Hi there, I have searched for some examples, but to no real avail, for a JS function that displays a user Yes/No dialog box. Basically, i have an ASP application that displays a SQL table on an ASP page. I have created a "Remove" hyperlink (in a loop) by each record and i need to use an OnClick event so when the user clicks this hyperlink it displays this Yes/No dialog. At the moment the hyperlink simply removes the relevant record. I need an OnClick event that displays a Yes/No box that when the user clicks Yes - it goes to remove.asp, and when No is clicked it does nothing. User Clicks Remove next to record > Yes/No dialog> Yes = remove.asp No = End. ***** ***** Current Hyperlink (passing ID variable in querystring - needs to be maintained through the javascript: <a href="remove.asp?ID=<% =server.URLEncode(RS("ID"))%>">Remove</a> ***** *****

< a href ="#" onclick =" customConfirm(''remove.asp?ID =<% = server.URLEncode(RS(" ID")))%>''); return false" >删除< / a> customConfirm是一个接受URL作为参数的函数,然后用两个按钮在屏幕中央显示一个DIV。按钮会有点击,点击时,或者什么都不做(NO按钮)或将location.href设置到remove.asp页面。 - 机会有利于准备好的思想 comp.lang.javascript常见问题 - H T tp://jibbering/faq/

确认对话框是否正常? 你可以没有按钮文字,但含义很清楚。 if(确认(你想要这个吗?)) alert( 是) 其他 提醒(否) Would a confirm dialog be OK ? You can''t chnage the button text, but the meaning is clear. if(confirm("You want this ?")) alert("yes") else alert("No")

更多推荐

Javascript是/否

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

发布评论

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

>www.elefans.com

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