drg17404 2014-03-28 14:46
浏览 39
已采纳

在jQuery表单向导中更改上一个和下一个按钮的标签?

I'm using jQuery Form Wizard and I am in the need of making it translatable. I've got the actual translation working for the form for everything but the buttons which seem hard-coded (and I am really new to jQuery).

Is there a way of making the labels change dynamically according to the rest of the translation support, which uses an URL parameter and the translated strings in variables? This is coded with php.

Edit: That I need help with is to change the label of the previous, next and submit button in jQuery Form Wizard module: http://www.thecodemine.org/#

Edit 2: Well, I've tried to actually change the value of the HTML, but it only works for the back button. Next button label is still "Next". I also tried using jQuery to change the value for me, with the same result, using #next.val("My own next value");

  • 写回答

1条回答 默认 最新

  • drjtua5953 2014-03-28 14:52
    关注

    No, PHP can only edit the document before it is loaded into the browser, not after being displayed.

    1. An option is to use a Javascript Translator such as Google Translate.
    2. Another option is to set the language of your webpage as a meta tag and hope the browser asks to translate the page (ie Google Chrome will)

    Edit: Looking at the JQuery code wizard docs, there are two build in functions textNext and textBack and finally (textSubmit) ie

    $('#idOfForm').formwizard('textNext','newText'); 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作