如果不是HREF Javascript,那么[例如手机] [英] If Not A HREF Javascript then what [e.g. mobile phones]

查看:48
本文介绍了如果不是HREF Javascript,那么[例如手机]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

回复:

哪个"href"我应该用于JavaScript链接的值,#"或"javascript:void(0)"?

我正在玩我通过php o从浏览器从mysql发送的项目列表.

I am playing with a list of items I am sending from mysql via php o the browser.

在浏览器中,我想说在此处编辑此记录".

In the browser I want to be able to say "Edit this record here".

我希望能够在台式机和手机上使用.

I want to be able to use on desktop and on my phone.

问题是我的手机允许我导航[给焦点]链接,表单按钮,表单输入字段等,但不说图标图像.[不是触摸屏手机]

The issue is that my phone allows me to navigate [give focus to] links, form buttons, form input fields etc but not say icon images. [Not a touch screen phone]

所以,如果我不使用HREF为onclick事件选择可聚焦的点,那又会怎样呢?

So if I don't use A HREF to pick up a focusable point for onclick events then what?

谢谢

推荐答案

最好使用图像按钮进行输入:

It would be best to use an image button for input:

<input type="image" src="someimage.gif" alt="Some Image" onclick="yourFunction()" />

或者,您也可以使用以下形式的< a> :

Alternatively, you could also use this form of <a>:

<a href="javascript:yourFunction()">Some Link</a>

这篇关于如果不是HREF Javascript,那么[例如手机]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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