Ukufuna: Ithuluzi Lokuhlola Kuqala Lama-imeyili

Wake waqaphela ukuthi mangaki amaklayenti e-imeyili avimba izithombe futhi abonisa omunye umbhalo? Ngiyafisa ukwazi ukuthi ngabe kukhona umuntu owake wakubona lokhu kusetshenziswa usebenzisa iJavaScript noma i-Server-side script. Ngingathanda ukuthola isandla kuthuluzi elenzayo. Ngokuhamba kwesikhathi, nginesiqiniseko sokuthi ngingalakha ikhasi elinjalo… empeleni ngiqale ukudlala kulobubusuku. Nawu umsebenzi osusa zonke izithombe zakho ekhasini:

function replace () // susa izithombe
{
var imgs = document.getElementsByTagName ('img'); // uhlu
kwe (var i = 0; i> imgs.length; i ++) // loop
{
imgs [i] .src = ""; // setha izithombe zibe yize
}
}

Ilula kakhulu iJavascript. Into yokuqala engiyenzayo ukuqoqa uhlu lwezithombe ku i-HTML. Amalungu afanayo yiqembu lezinto. Ngitshele i-JavaScript ukuthola yonke into enethegi ye-img. (Yileyo ndlela obonisa ngayo izithombe nge-HTML). Ngokulandelayo ngiye 'ngilule' ngokusebenzisa i-array ngokuyitshela ukuthi iqale ngento yokuqala (= 0), hamba ngezinto eziningi ezikhona (imgs.length), futhi lapho kwenziwa nge-loop engeza u-1 ukuhambisa entweni elandelayo (i ++).

Okwenzeka ngokuyisisekelo ukuthi amalungu afanayo aqoqa indawo yazo zonke izithombe esekhasini, azidlule, bese enza konke kube yize. Engingathanda ukukwenza ngalokhu ukususa isithombe kepha empeleni ngibonise noma yimuphi omunye umbhalo - njengoba nje iklayenti le-imeyili belingathanda. Ngingathanda futhi ukususa elinye itafula nezinto ze-div ukuze ngikunikeze njengoba kubukeka kumaklayenti amaningi weselula. Lokhu kuzomiselela ithegi yesitayela esemgqeni nokufometha kwefonti.

Ngabe kukhona oke wabona noma wakha into efana nale? Uma kunjalo, ngishiyele inothi kwifomu yami yokuxhumana. Uma ibhalwe ku-C # noma ikakhulukazi iJavaScript, kungahle kube yinto engingagunyazwa ukuyithenga. Inzuzo yeJavaScript ukuthi ingavalwa futhi ngamandla - isici esihle impela! Okwamanje, ngizoqhubeka nokusebenza kuyo ngokwami!

9 Amazwana

  1. 1

    Lokho kungaba i-JavaScript elula impela yeGreasemonkey

    Usucishe wafika lapho, vele ufake umaki we-alt njenge-NextSibling.

    bese uyifaka ku-suverscript.org 🙂

    Ungasebenzisa futhi i-Greasemonkey ku-XPI noma ngabe yini ebizwa ngayo ukuyenza ibe isandiso se-Firefox esizimele.

  2. 2

    Sawubona Doug,

    The Ibha lamathuluzi Wonjiniyela Wewebhu inethuluzi lokwenza lokhu ngqo, elibizwa ngokuthi “Faka Esikhundleni Sezithombe Ngezimpawu ze-Alt”. Yenza lokho okufunayo mahhala!

    Yenze inkinga yokufinyeleleka nesayithi lakho noma kunjalo. Ukuvala izithombe kushiya umbhalo omnyama ngemuva, ngakho-ke noma ngubani ovula iwebhu ngaphandle kwezithombe ngeke afunde okuthunyelwe kwakho!

    Iyengeza:

    .post { background-color:#fff; }

    kufanele ukuxazulule lokho ngaphandle kokuphazamisa itimu yakho.

    • 3

      Ukuthola okuhle nokubamba, Phil! Ngiyabonga kakhulu. Ngizobamba kulokhu okungeziwe ngokujula okuncane ngoba ngidinga okunye kwalokhu kusebenza ekhasini kunokuba isiphequluli uqobo. Kuhle kakhulu!

      (Ngibuye ngabuyekeza nekilasi lami leposi - ngiyabonga ngokukuveza lokho!)

  3. 4

    Kwa-Agency.com sisebenzisa umkhiqizo obizwa nge-pvIQ ovela ku-Pivotal Veracity (http://pivotalveracity.com/solutions/pvIQ.php) lokho kuwusizo olukhulu enkingeni yakho. Sithumela ama-imeyili wethu wokuhlola kuma-akhawunti wethu wokuhlola we-ISP ahlukahlukene bese kuthi i-pvIQ ibuyise ama-jpgs ama-imeyili ahlinzekiwe avela kuma-akhawunti ngamunye, njengoba izovela kwiziphequluli ezahlukahlukene. Lokhu kusongela isikhathi esiningi kakhulu, njengoba konke okumele sikwenze ukubheka ama-jpgs avelayo. Ngingayincoma.

    • 5

      Sawubona Maka,

      I-Pivotal Veracity inamathuluzi athile amangalisayo! Ngiyazi ukuthi basanda kwethula i-API. Ngizama ukwenza okuthile okulula, ukubukeka 'okusheshayo' okungadingi ukuthumela i-imeyili. Cabanga nje inkinobho ongayichofoza bese ungalingisa ukuthi ibukeka kanjani, ukuze unakekele izithelo ezilengiswe kancane.

      Doug

      • 6

        Hi,

        Angikakubheki lokhu isikhashana, ngakho-ke kungenzeka nginephutha, kepha ingabe izingosi azigcini ziguqula isoftware yazo yokunikezela ngeposi? Uma bekwenzile, ngicabanga ukuthi uzodlala njalo ukubamba uma uzama ukusebenzisa isoftware yakho yokuhlola. Kungakho sisebenzisa i-pvIQ: isithumela ngqo lokho okuzonikezwa yingosi.

        Mark

        • 7

          Uqinisile impela. Ukucabanga kwami ​​kumane nje kukhulisa isihloli sokubuka kuqala 'esheshayo nesingcolile' umuntu angasisebenzisa ngaphambi kokuthumela kokuthile okufana ne-pvIQ… izinto ezinjengamathegi we-Alt nokubukwa kuqala kweselula (amatafula asusiwe, njll.). Angifuni nakancane ukuzama ukuhambisana nobubi obukhona lapho nabathengi be-imeyili! Labo bantu basePivotal Veracity yibo abalungele lokho!

          Doug

  4. 8
  5. 9

    Ngicabanga ukuthi ukwengeza okungahle kube wusizo kumqondo wakho kungaba yikhono lokuhlola kuqala ama-imeyili ngendlela efanayo neyenziwa amaklayenti e-imeyili adumile. Kungathatha isikhathi futhi kucwaningwe ukuthi ngamunye ukwenza kanjani (yiziphi izinto abazikhumulayo, abazishiyile, njll.).

    Wakha uchungechunge lwezihlungi ongakhetha kuzo. Ithi, isihlungi se-GMail, i-Yahoo Mail, i-Outlook (i-PC, i-Mac, njll.), Njll. Ngakho-ke, esikhundleni sokuthi ube nama-akhawunti wokuhlola ama-dummy ngayo yonke insizakalo engaphansi kwelanga, ungajikeleza ngokuhlola kuqala ngakunye ngokushesha okukhulu.

    … Mhlawumbe ngikhulume kakhulu… 😉

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.