Nasıl göndermeden önce bir form üzerinde iki değişken bir etki alanı adı bölmek için javascript kullanabilirsiniz?

0 Cevap php

I have a an input box on my homepage which i want users to input their domain to search fveya. E.G.

test.com

veya

test.gb.com

vs ve ben ilk kadar her şeyi ayıklamak için teslim (yazılan) üzerine onu istiyorum "." bir değişken $ domain ve ilk dahil sonra her şeyi içine "." $ ext içine

Yani $ alanı şimdi "test" içerebilir ve formu yayınlanmıştır zaman $ ext ". Gb.com" içerecektir.

Olası?

Here is the code fveyamy form so far . What i need is to have everything that is inputted upto the first "." stored in the name="domain" form variable and everything in this line i.e from the $ext variable stored fveyathe form submission

Kod kadar:

<form method="post" action="https://www.jms-networks.net/domainchecker.php">
<span class="text"><input value="{php} print $_POST['sld'] ? $_POST['sld'] : 'Search fveyayour domain name'; {/php}" type="text" name="domain" class="searchbox" onfocus="if (this.value == this.defaultValue) this.value = '';" onblur="if (this.value == '') this.value = this.defaultValue;" /></span>
<input type="hidden" name="direct" value="true" />
<!-- This one below should contain the $ext value everythign after including the first "." -->
<input type="hidden" name="tlds[]" value="what goes here???" />
<input type="hidden" name="tlds[]" value=".me.uk" />
<input type="hidden" name="tlds[]" value=".org.uk" />
<input type="hidden" name="tlds[]" value=".com" />
<input type="hidden" name="tlds[]" value=".net" />
<input type="hidden" name="tlds[]" value=".org" />

<input type="submit" value="Go" class="product-headers" />
</form>

0 Cevap