调用JavaScript的表格内的输入按钮 [英] Input button inside a table calling javascript

查看:62
本文介绍了调用JavaScript的表格内的输入按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在表单内,表格内,行中,单元格中都有一个输入按钮.
它不起作用.

我把同样的按钮放在你桌子外面没问题.

我必须在桌子上放些东西吗?

谢谢,

-ren

<input type="button" value="Button" name="B3" onclick="alert(''hello'');"></td>

Hello,

I have an input button inside a form, inside a table, in a row, in a cell.
It doesn''t work.

I put the same button outside of thee table no problem.

Do I have to set something on the table?

Thanks,

-ren

<input type="button" value="Button" name="B3" onclick="alert(''hello'');"></td>

推荐答案

看起来没有问题,也不需要任何额外的东西.
在表内或表外的
Nothing looks wrong nor anything extra is needed.
<input type="button" value="Button" name="B3" onclick="alert(''hello'');">

应该起作用,并且应该触发Javascript警报.

查看设计器中表格是否正确构成.尝试使用表中的按钮查看页面的源代码,看是否一切都很好.如果您无法打开,请发布视图源(不仅仅是表部分)供我们查看.

inside or outside a table should work and Javascript alert should be triggered.

Look in the designer if the table is correctly formed. Try to view-source the page with button in table and see if all looks good. If you are unable to, then post the viewsource (not all just the table part) for us to see.


很多时候,有很多东西阻止了javascript代码的执行.好吧,通过使用方便的danady调试器看一下幕后情况.不幸的是,没有简单或单一的调试javascpit的方法.每个浏览器都有他们"的连接方式.有些简单而直接,而另一些则让我们留在那儿.

检查FireFox的 FireBug [ ^ ],Chrome浏览器的脚本调试器 [ ^ ]或IE的[我希望不走那么远]

您也许可以找出未调用或执行的内容.
Many times there many be something that is preventing the the javascript code from executing. Well, take a look behind the scene, by utilizing the handy danady debugger. Unfortunately there is no simple or single way of debugging javascpit. Each browser has ''their'' way of hooking into it. Some easy and straight forward while other, well let us leave it there.

Check FireFox''s FireBug[^], Chrome''s Script Debugger[^] Or IE''s [don''t want to go that far I hope]

You may be able to find out what it is not been called or executed.


您好,

感谢您的答复.表格格式不正确,其中一行被弄乱了.

-ren
Hello,

Thanks for the responses. It was improper formatting of the table, one of the rows was messed up.

-ren


这篇关于调用JavaScript的表格内的输入按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆