Link in input text field

前端 未结 8 863
余生分开走
余生分开走 2020-12-17 21:43

HI All,

I know this is bit strange question, but please suggest.

I want to create a link on website url content in input type\"text\" field not any other htm

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 22:20

    Yes, it is possible, but it's not that simple. You need to create div, or other tag you prefer, that will be always floating over your input, using CSS positions, and create anchor inside it.

    For example, virtual keyboard img is embedded into input field that way on russian Google page (http://www.google.ru/)

    Because of browser-compatibility it's not a simple task.

    EDIT: Understood your question a little more. You still need first part of the answer, and you will need to handle keypress event inside your input. When symbol is entered you will need to update your floating div.

    So now task is difficult even more. Maybe you should revise your model and not the code.

提交回复
热议问题