Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search 我的搜索功能不起作用_Search_Twitter - Fatal编程技术网

Search 我的搜索功能不起作用

Search 我的搜索功能不起作用,search,twitter,Search,Twitter,我的代码一直工作到我尝试“推特”一个网站。如果我以tweet的形式输入www或.com,它会告诉我它检测到了一个好的url。但是当我输入xxxxxx www xxxxxx(x是任何东西)时,它不会检测到url请用JavaScript标记它,这不是Java。可能是Java。编写一个名为var的类,以及名为prompt和confirm的适当方法。可能不是。用正确的语言标记一个问题将更有可能吸引正确的答案 var cat = prompt("What Do You Want To Tweet??!"

我的代码一直工作到我尝试“推特”一个网站。如果我以tweet的形式输入www或.com,它会告诉我它检测到了一个好的url。但是当我输入xxxxxx www xxxxxx(x是任何东西)时,它不会检测到url

请用JavaScript标记它,这不是Java。可能是Java。编写一个名为
var
的类,以及名为
prompt
confirm
的适当方法。可能不是。用正确的语言标记一个问题将更有可能吸引正确的答案
 var cat = prompt("What Do You Want To Tweet??!");

 if(cat.length >= 140)
 {
 confirm("Sorry but your Tweet was over the 140 character limit by: " + (cat.length - 140));
 confirm("You need to resubmit a Tweet that is not over the 140 Character limit");
 }
 else{
confirm("Success, Your Tweet has been posted!");
 }
 //scan for websites

 if (cat.search(" www ", " http ", ".com"))
 {

 }
 else{
 confirm("We have Detected a URL in your Tweet");   
 }