小编kar*_*yan的帖子

如何在输入标签中插入图像

我只想像大多数很棒的网站一样在输入标签内显示图像

我的代码给出了这样的输出......

在此我想在注册号和密码之前的文本框中插入一个图像..我该怎么做?

html css

3
推荐指数
1
解决办法
1万
查看次数

使用jquery动态创建html元素

我需要一种方法来解决这个问题.live()在我使用的jQuery 1.9中被删除.所以现在我不知道如何动态地将元素添加到文档对象模型树中.

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Trying dynamic adding</title>
        <style>

            body {
                margin:10%;
            }
            #cool {
                border:5px solid red;
            }
            .fool {
                background-color:red;
                width:100px;
                height:100px;
                border:1px solid green;
            }
            .lol {
                background-color:yellow;
            }

        </style>
        <script src="jquery.js"></script>
        <script>

        $(document).ready(function(){
            alert("Application has been started");
            $('#hool').addClass("lol");
            $('#create').click(function(){
                alert("Element created here");
                var a=$('#cool');
                b="<div class='fool'></div>";
                a.append(b);
                alert("Element created");
                var c=$('.fool');
                c.addClass("lol");
            });
            $('.lol').click(function(){
                alert("New elements are good to go");
                $('.lol').css("background-color","teal");
            });
            function hello(){
                alert("welcome");
            }
        });
        function hello(){ …
Run Code Online (Sandbox Code Playgroud)

html javascript css scripting jquery

0
推荐指数
1
解决办法
520
查看次数

标签 统计

css ×2

html ×2

javascript ×1

jquery ×1

scripting ×1