크롬 자동완성 막기

Open API/Jquery|2021. 12. 20. 14:18
반응형

의도치 않은 input에 아이디가 자꾸 찍혀 있어서 찾아보다보니 고질병으로 

autocomplete 속성으로 하는 방법이 있었으나 크롬 버전이 바뀌면서 사용 불가능.

 

 

<input id="email" readonly type="email" onfocus="if (this.hasAttribute('readonly')) {
    this.removeAttribute('readonly');
    // fix for mobile safari to show virtual keyboard
    this.blur();    this.focus();  }" />

 

https://stackoverflow.com/questions/15738259/disabling-chrome-autofill

 

Disabling Chrome Autofill

I have been running into issues with the chrome autofill behavior on several forms. The fields in the form all have very common and accurate names, such as "email", "name", or "password", and the...

stackoverflow.com

 

댓글()

jQuery 여러개의 Class가 적용된 객체 선택하기

Open API/Jquery|2018. 11. 29. 10:50
반응형

How can I select an element with multiple classes in jQuery?

- without space.

여러개의 클래스가 지정된 객체를 선택하고자 할 때.. 어떻게 해야할까

- 띄어쓰기 없이 해야함.

<span class="a b c">multiple classes</span>


$(".a.b.c").trigger("click")




댓글()

jquery ajax 동기처리가 안되는 경우.. async 옵션이 적용 안될 때.

Open API/Jquery|2017. 9. 20. 18:59
반응형

jQuery ajax 옵션중에는 async 옵션이 있습니다.

이것은 기본적으로 ajax가 비동기 처리를 하지만 필요에 따라 동기 요청을 하기 위한 옵션이지만

최근 경험상 적용이 되지 않는 것이 확인되어 api 사이트를 확인해보니 

아래와 같은 내용이 확인이 됩니다.


크로스 도메인일 경우 데이터 타입이 jsonp라면 지원되지 않는다. 

위의 조건 외에도 1.8 버전 이후부터 지원되지 않음이라고 명시되어있고 

콜백 함수를 이용하도록 명시가 되어있으니 

1.8버전 혹은 최신 버전을 사용하는 경우 문제가 될 것같습니다.


그런데...되는 경우도 있고..안되는 경우도 있고...모호하네요.


확실하게 그냥 콜백 함수를 사용해야겠습니다.


 

  async (default: true)
  Type: Boolean
By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp"requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done().


http://api.jquery.com/jQuery.ajax/

댓글()