small javascript code to check urls..

进行中

(To be done either in javascript or using jQuery)

- A form has a textfield: search_or_url e.g.

<form method="post" action="#" id="myForm">

<input type="text" name="search_or_url" /><br />

<button name="Search or Add" type="submit"></button>

</form>

- On Submission of form. Strip whitespace at ends of search_or_url Check:

Is search_or_url a URL?

If it is, Does the URL fit one of these:

[url removed, login to view][string]

[url removed, login to view]:[int]

[url removed, login to view][string]

[url removed, login to view][string]

[url removed, login to view][user]/[string]

(NB: should cope with [url removed, login to view] or [url removed, login to view])

If it does alert('/save/domain/[url]/[parts]')

e.g. /save/sourceforge/projects/sawat

/save/thingiverse/thing:191991

/save/pinshape/items/adadadaad-asdam9a99da

/save/instructables/id/sasdaadada

/save/github/user-id/strasdaiiasdia

If it doesn't match these alert('cant add site yet')

If it isnt a url, alert('searching for '[entered text]').

技能: Javascript, jQuery / Prototype

查看更多: code javascript auto popup lightbox, google check code, code converte char int, html javascript small projects, vote code javascript, dynamic urls voucher code, check code injection php, update code javascript, check check code process design, pizza order form code javascript, check code website crawler, crm ult conversion timezone code javascript, javascript small chat, check scroll javascript, check mouse javascript, google spell check service javascript

项目ID: #12151913

已悬赏给:

£11 GBP 在1天内
(2条评论)
1.4

2名威客为此工作的平均竞标价是£15

mak94pk

Hi, Firstly, Thank you for reviewing my proposal. I have gone through your requirements and came to know that you need an expert web developer to build your website. I have strong knowledge and 3+ years experience i 更多

£18GBP 在1天里
(0条评论)
0.0