English 中文(简体)
Javascript parser赢得了更多的工作。 submit子被点击时没有发生。
原标题:Javascript parser wont work anymore. Nothing happens when the submit button is clicked

我最近发现,这是我玩.的游戏的script脚石,这种游戏基本上使我的生活更加容易,做一些教.。 当我首次使用该书时,该书发挥了巨大作用,但当时我停止使用该书长达数周,因为我没有时间玩游戏,因此使用该书。 我昨天和突然再次开学,这本书不再奏效,我会nt灭我所需要的内心。 当我点击提交纽顿后,该信息被放入文字箱时,它就不再发挥作用。

谁能帮助我找到什么错误,为什么它能再工作?

这里是文字,在这里,它放在一个网站上(例如,我在下面所张贴的内容是:www.cnparser.webs.com)。

<html>
<head>
<title>Recruitment Parser</title>
<script type="text/javascript">
window.onload = function()
{
var pageSource = document.getElementById( pgsource );
var submitButton = document.getElementById( submit );
var bbcodeBox = document.getElementById( nobb );
var outputArea = document.getElementById( output );

submitButton.onclick = function()
{
    var cyberMessageLink = "http://www.cybernations.net/send_message.asp?Nation_ID=";
    var cleanUp = pageSource.value.replace(/[^A-Za-z0-9 >]/g, "");
    var rulerNames = cleanUp.match(/titleRuler[A-Za-z0-9_ ]{3,}(?=>)/gi);
    var nationID = cleanUp.match(/ageaspNationID[0-9]{3,}/g);

    if(bbcodeBox.checked)
    {
        for(var i=0; i<rulerNames.length; i++)
        {
            if(i%25==0)
            {
                outputArea.innerHTML+="[url="+cyberMessageLink+nationID[i].substring(14)+"]"+rulerNames[i].substring(11)+"[/url]" + "<br>";
                continue;
            }
            outputArea.innerHTML+=rulerNames[i].substring(11) + "<br>";
            if(i%24==0)outputArea.innerHTML+="<br>";
        }
    } else {

        for(var i=0; i<rulerNames.length; i++)
        {
            if(i%25==0)outputArea.innerHTML+="<br>";
            outputArea.innerHTML+=rulerNames[i].substring(11) + "<br>";
            }
        }
    }
}
</script>
</head>

<body>
<table border="0">
<tr>
    <td>
        <textarea id="pgsource" cols="80" rows="20"></textarea><br/>
    </td>
    <td>
        <b>Style</b><br>
        <input id="nobb" type="checkbox">BBcode</input><br>
    </td>
</tr>
</table>
<button id="submit">Submit</button><br><br>
<span id="output"></span>
<!-- --><script type="text/javascript"      src="http://static.websimages.com/static/global/js/webs/usersites/escort.js"></script>   <script type="text/javascript">if(typeof(urchinTracker)== function ){_uacct="UA-230305-  2";_udn="none";_uff=false;urchinTracker();}</script></body>

</html>
问题回答

联系网站:

如果停止使用电子邮件:

Did you email Gnomy?





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签