English 中文(简体)
动态窗口。 添加元素后的位置
原标题:dynamic window.location after adding an element dynamic

我在网页上打上了“A”标签,当用户点击时,该网页将有一个新的信息输入领域,如:

<><>光纤>

<a href="" class="smallLink" onclick="return ioAddNewContent()">new info</a>

我不想在点击“新胎儿”之后添加斜线,这样,我就把javascript的返回宣布无效。

http://www.ohchr.org。

    function ioAddNewContent(){
    var bigLi = document.getElementById( ioAddContents );
    var p = document.createElement( p );
    var label=document.createElement( label );
    var input = document.createElement( input );
    var a = document.createElement( a );
    label.setAttribute( class ,  ioAddOneContent );
    label.innerHTML= write one info ;
    input.setAttribute( type ,  text );
    input.setAttribute( class ,  longInput );
    a.setAttribute( href ,   );
    a.setAttribute( class ,  smallLink );
    a.setAttribute( onclick ,  return ioAddNewContent() );
    a.innerHTML=  new info ;
    p.appendChild(label);
    p.appendChild(input);
    p.appendChild(a);
    bigLi.appendChild(p);
    return false;
}

在点击“新信息”10倍后,用户必须roll缩到新投入领域,而不用说,“新信息”每点击“新信息”的want,屏幕应进入这一新的投入领域:

i 知道,通过在《刑法》中添加一个名称的标签 = ,然后将“窗口. 所在地”列入javascript代码,但希望这样做。

当用户点击添加新的投入领域时,该屏幕应当自动浏览到这一新的投入领域

最佳回答

Use .focus() and .last()

$( a.smallLink ).last().focus();

这是支离破碎套的一部分,不能确定你是否使用图书馆。

问题回答

您可以改变履历。 滚动集装箱(如身体或干).)的顶层。

Hope it helps.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签