c*******s 发帖数: 1555 | 1 How can I cancel the onblur event when I click on a button which has onclick
event defined? For instance, a text field has an onblur event handler
defined, and if the user clicks on a button, the onblur function will be
triggered first, and the onclick will be ignored. then the user has to click
twice in order to go to next screen. Is there anyway that the onblur event
can be canceled if onclick is detected? I am using javascript. Thanks. |
|
|
i********p 发帖数: 16 | 3 I'm not sure if your content inside "divContent" has to be dynamic. If not, you
can add the content inside the div tag first, use CSS to make it display to
"none". In your text field, onblur to set its display to "block". On click
on your button, check the status of your "divContent", if "divContent"
display is none, then set display to "block", else go to "next.html". see the
code below:
http://www.w3.org/1999/xhtml">
s****a 发帖数: 6521 | 4 【 以下文字转载自 Programming 讨论区 】
发信人: shorea (未注册用户), 信区: Programming
标 题: 求一网络编程解决办法
发信站: BBS 未名空间站 (Mon Sep 9 00:51:04 2013, 美东)
PHP里两个输入框,想在第一个输入框输完,onblur后,就查询数据库,以第一个框内
容为字段A,查询mysql得出字段B,再把字段B显在第二个输入框中。
是不是必须用Ajax才能实现? 请指教! | |
|
m**k 发帖数: 4039 | 5 有两个文本输入框,text2 的值是text1值的两倍,
要求用户在输入text1的值的同时,text2的值立刻发生变化。
该如何实现,好像不能用onblur或者onchange,因为这两种
方法你必须在文本框以外的地方点击一下鼠标text2的值才会
更新。
另外,如何将text2锁定不让用户进行修改?
多谢! |
|
v**m 发帖数: 242 | 6 onblur or onchange should work, at least I think so.
if you want to lock text2, you can try use onChange for
text2, keep
the value the same. |
|
l*****a 发帖数: 166 | 7 why "the onclick will be ignored"? Unless there is a break of the process
such as redirected to another page. Did you try it? What did you want to do?
Maybe it is case by case. |
|
|
A*******n 发帖数: 625 | 9 TextBox:
radiobuttonlist:
RepeatLayout="Flow" RepeatDirection="Horizontal" Visible="false" >
我想用textbox的value在database里面找到相关的值,再加到radiobuttonlist。
这是我的用的function:
1. marketcode.Attributes.Add("onblur", "javascript:ShowTerms();");
2. function ShowTerms() {
var marketerCode = document.getElementById('<... 阅读全帖 |
|
|