帮助 - 更改单击文本 - 文本内部有另外的onclick与php变量 [英] Help - change text on click - text has another onclick inside with php variables

查看:71
本文介绍了帮助 - 更改单击文本 - 文本内部有另外的onclick与php变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助 - 更改单击文本 - 文本内有另外一个onclick与php变量

----------


我认为我想做的很简单。


我在页面上有2个按钮。 1按钮允许显示消息的线程,另一个按钮折叠同一个线程。工作正常。


我被问到是否只能按一个按钮。


我玩了几个java脚本。他们似乎一切正常,直到我把我添加的代码放在应该被替换的文本行中。有帮助吗?这里是所有相关的代码:


两个按钮的原始代码工作正常ritght没有错误:

Help - change text on click - text has another onclick inside with php variables
----------

I think what I''m trying to do is simple.

I have a 2 buttons on a page. 1 button allows a thread of messages to be displayed, the other button collapses that same thread. Works fine.

I was asked if I can just make it one button.

I''ve played around with a few java scripts. they seem to all work fine until i put my added codes in the text line that is supposed to be replaced. Any help? Here is all pertinent code:

Original Code with both buttons which works fine ritght no without errors:

展开 | 选择 | Wrap | 行号

推荐答案

一些建议:


1.使用按钮,而不是使用链接:
Some suggestions:

1. Rather than using a link, use a button:
展开 | Se lect | Wrap | 行号


感谢您的快速回复。


使用按钮的唯一问题事实是所有其他按钮都是''表''我已经格式化以匹配页面颜色。


有没有办法将提交按钮格式化为我想要的任何颜色?基本上看起来像一个小盒子,当你将鼠标悬停在它上面时会改变背景颜色? ...当然我也想改变边界线&颜色以及字体颜色等...


我在寻找过程中遇到了这个问题并寻找解决方法。我尝试制作一个看起来像其他按钮的图形桌子但我最终遇到了一些问题,主要是图形看起来不像其他按钮,以及放置问题等等。另外,我认为它会加载更快,没有任何图像。


有什么建议吗?我正在考虑使用acoder'的建议给图像创建处理一次拍摄


再次感谢...(直到周日我才能尝试*叹气*)

@acoder
Thank you for the quick response.

The only problem with using a "button" is the fact that all the other buttons are ''tables'' which i have formatted to match the page colors.

Is there a way to format the submit button to any color i want? basically to look like a small box which changes background color when you hover over it? ...also of course I would want to change the border line & color as well as the font color etc...

I ran into that problem during my hunt and looked for a work around. I tried making a graphic that looks like the other buttons which are ''tables'' but I ended up having a couple problems with it, mainly the graphic not looking exactly like the other buttons, and placement issues among other things. Plus I figured it would load faster without any images.

Any suggestions? I''m thinking of giving the image creation deal one more shot using acoder''s suggestion

Thanks again... (I won''t be able to try it until sunday *sigh*)


@acoder


你可以设置按钮样式,但它不可靠。图像效果最好,但如果你决定改变颜色,你就会遇到问题。所以,我想,在这种情况下,链接会给予最大的灵活性。


建议2和3仍然适用,除了链接没有价值,所以你'' d改为设置innerHTML(或DOM)属性。
You can style a button, but it''s unreliable. Images would work best, but if you decide to change the colours, you''d have problems. So, I guess, in that case, a link would give most flexibility.

Suggestions 2 and 3 still apply except that a link doesn''t have a value, so you''d set the innerHTML (or DOM) property instead.


这篇关于帮助 - 更改单击文本 - 文本内部有另外的onclick与php变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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